NativeScript / NativeScript/NativeScript

Edit variables found in `AndroidManifest.xml` and `Info.plist` from a single file.

Open
#9,520 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
25.7k
Forks
1.7k
Avg merge
1d 5h
Merged PRs (30d)
35

Description

Is your feature request related to a problem? Please describe.
My client wants to be able to have multiple versions of the same app. One for production, a beta version for testFlight and an Ad Hoc version. I do not see an easy way to do this. It appears to currently involve manually editing multiple files which is error prone and messy.

Describe the solution you'd like
I'd like to be able to edit the variables found in AndroidManifest.xml and Info.plist from a single file like nativescript.config.ts or package.json.

Things like: CFBundleName, CFBundleDisplayName, CFBundleShortVersionString and CFBundleVersion or versionCode, versionName, package.

If I could edit these values in nativescript.config.ts I could very easily write some code to change these values by adding something like NODE_ENV=testflight to the beginning of of a NS build command. This would then set the required variables depending on the environments I've setup.

Describe alternatives you've considered
After asking around on slack I've found out that it's possible to add variables to app.gradle and build.xcconfig and use those in the files in question. However, I would like to be able to edit a single file.

If this feature does not exist I think it would help make nativescript more accessible for new users that want to do simple things like change the app name or version number. It would also help with more advanced things like I've mentioned above - swapping out the package name to build multiple versions of the same app.

If this feature already exist could you kindly explain how it can be achieved.

Many thanks

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 by reviewing the variables named in AndroidManifest.xml and Info.plist, then compare the existing app.gradle and build.xcconfig approach with nativescript.config.ts or package.json. Done would mean defining the requested app and version values in one supported file and applying them to both platform manifests, including environment-specific builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, typescript
Domain
build-system, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.