I am distributing the iPad application using apple Distributing enterprise applications for iOS devices.
In my application, it is very important to update the outdated version to prevent access to expired information. Therefore, I implemented an application update mechanism, as shown below.
When the user launches the application, every time I compare the installed assembly version code with one on the server, requesting the web service that I created and hosted on my own server. If an update is found, I ask the user to update the application using UIAlertView , and when the user clicks the "Update" button, I launch the URL that points to the .plist on my server, as suggested here.
NSString *appUpgradeUrl = [NSString stringWithString:@"http://domain.com/manifest.plist"]; NSURL *url = [[NSURL alloc] initWithString:[NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", appUpgradeUrl]]; [[UIApplication sharedApplication] openURL:url];
Now UIAlertView appears on the screen and asks the user for confirmation using the two buttons below, Cancel and Install. When the user clicks Install, he simply replaces the newer version, and when the user clicks Cancel, he simply disappears and does nothing.
Now here is my question: I want to force the user to update the application, as I said, it is very important to update it to new ones in order to prevent access to expired information. Unfortunately, I cannot do this. I want to receive a notification about the event that the Cancel button was clicked so that I can force the user to update the application by requesting the application update again through UIAlertView . Can I do it?
Let me know if there is any better idea than this to force update the application.
source share