Search code examples
iosuriinstagram-apideep-linkingurl-scheme

iOS - strange openURL issue opening wrong app


I have an app in prod, and there's a feature that opens the instagram app for the user to post a photo. It works perfectly fine, unless the user has this horoscope app installed, then when the user clicks the button, it opens the horoscope app instead of instagram.

Does this mean the horoscope app has the same URL scheme as instagram? Are there any safeguards built-in to prevent other apps using your URL scheme?


Solution

  • Apple does not enforce unique naming for app schemes. If you use the same scheme as another app, iOS has no way of knowing which App to launch. So yes both apps are using same URL scheme. You can use Document Interaction API, if you just want to share via Instagram. You can find more information HERE