Cordova iOS setting issue


#1

Hi!

I am using ionic commands for building applications in Android and iOS. I store some information like URL-scheme in .plist file, Bundle identifier, Bundle Version, Build of project in iOS.
But when I run iOS platform using command “$ ionic run ios”, every setting is removed. Any solution for this?


#2

Are you running ionic build ios? Also where are you editing these files, platform/ios?


#3

$ionic build ios also removes data.
And yes, I am making change in platforms/ios.

Thanks!


#4

That will happen then. If you make changes in the platform folders, they will get overwritten everytime your build with ionic build ios.

Best thing to do is to make your app in the www folder and change the bundle identifier in the config.xml


#5

If I create brand new project using $ionic start brandNew, I don’t find www/config.xml file.


#6

It’s not in /www, rather in project root /


#7

Yeah! Found config.xml at root. Can you tell me how I can define URL Scheme in config.xml and will it work for both - Android and iOS?
Also, I have added intent-filter in Android menifest.xml file as below.

 <intent-filter>
        <data android:scheme="xyz" />
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
    </intent-filter>

Should I remove this from menifest file after adding it in config.xml file?

Thanks!


#8

Any solution on my query?


#9

@ami I’m having a similar issue. A certain string value for a key is being overwritten when I build for ios. Did you find a solution?