1) Is it possible for an iPhone (iOS device) to automatically open an App (that they already have installed) when the user taps on a link (for example a link they received via email)? I'm thinking of using emails for notifications and all the email would have is some text about the notification and then a link that would automatically open the App - it doesn't have to pass any data to the App. If this is possible, sample code (or a URL that explains this) would be much appreciated.
2) In addition, if the user did not have the App, it would be nice if the link could open up the App Store directly to my App so they could download/purchase.
Thanks in advance.
BCB
Adding Javascript to Your Website to Open Your App You merely need to add some Javascript to your website that will auto trigger your app open. The function below, triggerAppOpen, will attempt to open your app's URI scheme once you replace your_uri_scheme with the one you added in the manifest above.
What is this? Restart Chrome and the next time Chrome asks for permission to open an external app, the prompt will have the 'Always open links of this type in the associated app' option. Enable this option and Chrome won't ask for permission again next time.
Add an URL scheme to your application in the info plist file.
Then catch this in the - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
Read this tutorial about the URL scheme I hope that helps.
1) Yes you can do what you described. See the Implementing Custom URL Schemes section in the iOS Application Programming Guide
2) I don't think you can do that. But you could provide a message to the user with another link to the AppStore. Have a look at the Apple URL Scheme Reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With