Description
I have to share a link (of the app itself). So taping on share button the application shares the url of a page inside. Then, the user which views the link and tap on it, should open directly with the (same) installed app. This works fine in Android, and this is a piece of Manifest:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="www.test.com" />
<data android:scheme="https" />
</intent-filter>
I'm using the SocialShare plugin to share the url:
share() {
let url = this.router.url;
SocialShare.shareUrl("http://www.test.com" + url, "http://www.test.com" + url);
}
This works fine in Android. But I have an issue in IOS, because it opens the link with safari. This a piece of Info.plist file:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>mytestapp</string>
<key>CFBundleURLSchemes</key>
<array>
<string>http://www.test.com</string>
</array>
</dict>
I tried to use just 'test' on info.plist schema, and then I tried to share the following url: test://my_custom_routing and it works fine in IOS, but it doesn't work on Android (it doesn't recognize it as an url). So the unique and possible way I can see is to use the "http://" for the link. But it doesn't work on IOS. What am I doing wrong?