Change Widget ID or Package Name for android/iOS platform on phonegap?

若如初见. 提交于 2019-12-03 12:25:09

Try this:

<widget id="com.company.app" android-packageName="com.company.androidapp" ios-CFBundleIdentifier="com.company.iosapp" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

P.S. android-packageName & ios-CFBundleIdentifier property are not properly documented but its works tested on latest(4.1.2) cordova.

I would create two projects and have them share a www folder.

Here is an example for local CLI builds:

/MyProject_base
  /iOS
    /www -> /MyProject_base/www
  /Android
    /www -> /MyProject_base/www
  /www

The iOS and Android folders will each have a separate full project in them with the www as a symlink to the base www.

This way you can customize each project in regards to settings and keep one www folder between the two.

Here is an example for PGBuild:

/MyProject_base
  /iOS
     /www -> /MyProject_base/www
     /config.xml
  /Android
     /www -> /MyProject_base/www
     /config.xml
  /www

Create two separate config.xml use one www folder. You will have to upload each version separate and it will be two separate apps in PGBuild, but this will allow sharing one www with two different app namespaces.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!