I am working on a way to update an enterprise app OTA. I am opening a url to a copy of my app from my own server inside the app when I detect a new version is available. This works well except I want to give the user the option of not updating the app if they don't want to. What I would like to know is if there is any sort of notification that is sent to the ios app if the user presses cancel in the dialog that pops up when the url is opened. In other words I want a way for the app to continue ONLY if the user cancels the update request.
Here is the code I am executing to update the app.
NSURL *url = [NSURL URLWithString:@"itms-services://?action=download-manifest&url=http://www.mywebsite.com/myapp.plist"];
if (![[UIApplication sharedApplication] openURL:url]) {
NSLog(@"%@%@",@"Failed to open url:",[url description]);
}
I wasn't able to find any information what-so-ever about the itms protocol in the apple developer docs. I was able to achieve the effect I wanted by presenting a custom UIAlertView asking the user if they wanted to update before opening the url, but this has the unfortunate side-effect of prompting the user twice if they want to update, and still doesn't really handle the case where they cancel the update after the first prompt.
Any help on the matter would be appreciated.