So I have a iOS/Android Ionic Cordova app that uses the ionic-plugin-deeplinks plugin. The plugin wasn't working when the AndroidManifest.xml had this in it:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="synapticforce.com" android:pathPrefix="/" android:scheme="https" />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
<data android:host=" " android:pathPrefix="/" android:scheme=" " />
</intent-filter>
but when I put this in its place it worked fine:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="yourekamobile" />
</intent-filter>
However, whenever I ionic prepare
if would overwrite my fix back to the original non-functioning way. I tried to change somethings in the parent level config.xml
for cordova as well as the plugin.xml parent/plugins/ionic-plugin-deeplinks
folder and it would still be overwrite to the original broken way. Then I went in parent/platforms/android/android.json
and changed where it wrote the original version to be my version and it consistently builds fine.
So I'm happy that it works but my question is why does it work? How is android.json
built? Is editing that file the correct thing to do or is there something that it pulls from that I should edit instead?