简体   繁体   中英

iOS deep linking + redirect to App Store if app not installed

I've integrated custom url calls to link to specific pages on my app with the url scheme definitions like so:

myapp://?id=123

the problem is that I am not sure how to cause the iOS to go to the App Store if my app is not installed on the specific device, like Pinterest app deep links do.

UIApplication has a canOpenURL: method that you can use to query the system to check if it can handle a URL with your custom scheme. If it can then you can open the URL and know your app is installed. If it can't then your app isn't installed and you need to push to the store instead.

This obviously needs to be added to an app, whether that be another one of your apps or a 3rd party app that you offer integration with.

If you mean from a web page then see this answer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM