Skip to content

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

@KristianDD

Description

@KristianDD

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions