Cordova + Ionic framework - How to safely change package name?

后端 未结 5 1399
伪装坚强ぢ
伪装坚强ぢ 2021-02-02 06:37

i would like to change default name of the installation package from default com.ionicframework.starterto com.something.something, how can i do it safe

5条回答
  •  耶瑟儿~
    2021-02-02 06:59

    All I did was: a) Go to MainProjectFolder -> config.xml and find the line which says

    b) Change the io.ionic.starter to com.myproject.mobile (reverse domain - that's what they call it, right)
    c) Save the file.
    d) Delete the platforms folder.
    e) Open the command prompt and
    - platform add android
    - build android
    -> build --release android
    -> generate key using keytool
    -> sign the apk using jarsigner
    -> optimize the code using zipalign (for great documentation on these commands, refer: https://ionicframework.com/docs/v1/guide/publishing.html.
    f) This process takes the package name from the config.xml file and build the apk from scratch thus eliminating the need for resetting any plugins as suggested. But I am new to this. May be there are other implications which experienced guys might point at. But this worked very well for me and I have deployed my first mobile app onto Google Playstore successfully.
    Hope this helps.

提交回复
热议问题