I’m having some issues with running the app on iOS and Android emulators using the same bundle ID and not sure how to create one in order to run on both platforms.
When I generate a new app template, by default it uses nativescript’s bundle id. Eg, in the package.json file, the “nativescript.id” property is set to “com.nativescript.PROJECTNAME”. While this works for basic builds, I wanted to use my own developer id.
For iOS it wasn’t an issue. In Xcode, I selected my dev id and called it a day. In the package.json file I set the “nativescript.id” property to my own iOS dev id. (eg: com.MYCOMPANY.PROJECTNAME).
While this works fine for iOS, I can’t use this for building for Android. Not even for emulator use. Using
tns run android, I get the error
I have never done builds and signings for Android, so I was following the docs here:
and the Android key signing procedure here:
I’m not able to get rid of the error. Anyone knows why “com.MYCOMPANY.MYPROJECTNAME” is not valid and where/show should I set this?
When I set it back to “com.nativescript.PROJECTNAME” it works. But obviously that’s not how I want it. And keep changing it back and forth once for iOS build and once for Android, is an obvious pain.