Delivering Updated Apps with Enterprise Application Distribution for iOS Devices?

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.

+4
source share
3 answers

As mentioned in other answers, you cannot be an Alert system delegate. However, since your application now knows that it is outdated, it can change its own user interface, for example, display only the manifest URL as a button and not allow the user to do anything until the application matches any version.

+2
source

Assign your controller as a delegate when creating the UIAlertView .

The alertView:clickedButtonAtIndex: call alertView:clickedButtonAtIndex: is called when the user clicks a button on the warning screen. You can decide what to do based on the index of the button pressed and configure the UIAlertView using any buttons you need. (See Link to the UIAlertViewDelegate Protocol .)

+1
source

Since we cannot access the delegate for system alerts. The solution I used is redirecting the user to the update screen. if the user does not update the application, he cannot use its functionality.

-1
source

All Articles