New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No option to have different app identifiers for iOS and Android and livesync working #3040

Closed
KristianDD opened this Issue Aug 4, 2017 · 2 comments

Comments

Projects
None yet
5 participants
@KristianDD
Contributor

KristianDD commented Aug 4, 2017

Please, provide the details below:

Tell us about the problem

Currently livesync woks with the application identifier specified inside "package.json". In order to have different application identifiers for iOS and Android currently, the user has to edit the "applicationId" key inside "app.gradle" file. This change will cause the livesync functionality to not work properly.

A solution could be to add the option for "id" key inside "package.json" to have values for iOS and Andoid. Something like:

"nativescript": {
    "id": {
        "ios": "{{appID1}}" ,
        "android": "{{appID2}}"
    }
  }

Which platform(s) does your issue occur on?

iOS/Android/Both

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.0.1
  • Runtime(s): 3.0.0
  • Plugin(s): 3.0.0

Please tell us how to recreate the issue in as much detail as possible.

Change the application Id in /App_Resources/android/app.gradle

android {
defaultConfig {
generatedDensities = []
applicationId = "{{appID1}}"

Change the application Id in package.json to something different.

"nativescript": {
"id": "{{appID2}}",

Solution

  1. Set in package.json
"nativescript": {
    "id": {
        "ios": "{{appID1}}" ,
        "android": "{{appID2}}"
    }
  }
  1. If you are using old project, remove the applicationId key from {AppResources}/Android/app.gradle
  2. If you have opened the the project in NS Sidekick remove the {AppResources}/Android/settings.json file
  3. Run the build

@KristianDD KristianDD self-assigned this Aug 4, 2017

@KristianDD

This comment has been minimized.

Show comment
Hide comment
@KristianDD

KristianDD Aug 4, 2017

Contributor

Related to #2825

Contributor

KristianDD commented Aug 4, 2017

Related to #2825

@frapaa

This comment has been minimized.

Show comment
Hide comment
@frapaa

frapaa May 2, 2018

Is it possible to also make this available during a build step? I have a case where the same app will be built and deployed for multiple customers on their Apple and Google accounts, so they all need a unique app id. If we change this in the files (package.json for iOS and app.gradle + shortcuts.xml for Android) as part of the build process, the release build will have uncommitted changes and be "dirty".

For example tns ... --appId=com.company.AppName

frapaa commented May 2, 2018

Is it possible to also make this available during a build step? I have a case where the same app will be built and deployed for multiple customers on their Apple and Google accounts, so they all need a unique app id. If we change this in the files (package.json for iOS and app.gradle + shortcuts.xml for Android) as part of the build process, the release build will have uncommitted changes and be "dirty".

For example tns ... --appId=com.company.AppName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment