NativeScript / NativeScript/nativescript-cli

Ability to merge ExportOptions.plist from App_Resources and from plugins

Open
#4,528 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature help wanted
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

It’ll be great to support merging of ExportOptions.plist file from App_Resources and from plugins. This way every user will be able to add custom options to this file and NativeScript CLI will merge them with the default options. Also, every plugin author will be able to add such custom options in platforms/ios folder of the plugin in case when it is required.

Currently NativeScript CLI supports merging of Info.plist files from plugins and from App_Resources. As the format of ExportOptions.plist and Info.plist is the same (the both files are .plist format), it seems the merging of ExportOptions.plist should be very similar to the merging of Info.plist files. Here is the code that merges Info.plist files. The mergeInfoPlists function has hardcoded path to the Info.plist file. It seems the common logic of this function can be extracted to a separate function, for example mergePlistFile. After that we can call this function for Info.plist and ExportOptions.plist:

mergePlistFile(<path to Info.plist>);
mergePlistFile(<path to ExportOptions.plist>);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/services/ios-project-service.ts at the mergeInfoPlists function and the hardcoded Info.plist path. Trace how plugin and App_Resources plist files are located and merged, then determine how the same entry point should cover ExportOptions.plist. Done means both plist sources can contribute custom ExportOptions.plist options while existing Info.plist merging continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, mobile-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.