Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic config.xml different widget id for different platforms

We use

   <widget id="com.activityo" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

for android and need to change widget id for ios. I mean i want to use 2 different widget id for different platforms.

Is there anyway ?? thanks

like image 678
Oğuz Tanrıkulu Avatar asked May 03 '16 18:05

Oğuz Tanrıkulu


1 Answers

Here is what I would use in the config.xml file:

<widget id="com.mywebsite.myapp" 
        android-packageName="com.mywebsite.myandroid" 
        ios-CFBundleIdentifier="com.mywebsite.myios" 
        version="1.0.0" 
        xmlns="http://www.w3.org/ns/widgets"
        xmlns:cdv="http://cordova.apache.org/ns/1.0">

In the above code:

id - Required - Specifies the app's reverse-domain identifier.

android-packageName - Optional - Alternative package name for Android, overrides id.

ios-CFBundleIdentifier - Optional - Alternative bundle id for iOS. Overrides id.

version - Required - Full version number expressed in major/minor/patch notation.

xmlns - Required - Namespace for the config.xml document.

xmlns:cdv - Required - Namespace prefix.

Source: Cordova Reference for config.xml file

like image 155
Devner Avatar answered Sep 22 '22 12:09

Devner