问题
I've integrated custom url calls to link to specific pages on my app with the url scheme definitions
example: myapp://?id=123
the problem is that I am not sure how to cause the ios to go to the appstore if my app is not installed on the specific device ( just like Pinterest ).
回答1:
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.
来源:https://stackoverflow.com/questions/24733237/ios-deep-linking