Cordova: Is it possible to have different app IDs for android and ios platforms?

后端 未结 2 1368
攒了一身酷
攒了一身酷 2020-12-14 16:45

Let\'s say I have a Cordova application with an id of com.StackOverflowExample.MyQuestion, which I created with Cordova 3 using the CLI (cordova create). I have

2条回答
  •  佛祖请我去吃肉
    2020-12-14 17:18

    Yes, you can do that. There is more option for them, it's depends on how do you build your Android application (how do you create your apk).

    If you create the apk using cordova, first you have to decode your apk:

    apktool d .apk 
    e.g: 
    apktool d your.apk decodedir
    

    Change the package="com.StackOverflowExample.MyQuestion" string in AndroidManifest.xml.

    Encode your apk:

    apktool b  
    e.g:
    apktool b testdir/ your.repacked.apk
    

    If you create the apk using any Android developer tools, you can change the id in the appropriate xml file (AndroidManifest.xml), and build the app.

提交回复
热议问题