link to automatically open my App?
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
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.
精彩评论