Franco Carbonaro
Franco Carbonaro

Reputation: 185

iOS 8 Enterprise apps update

I'm working on an enterprise app that is distributed itms-services.

This app has a service that lets the user know when there is an update, so when the user press the update button the app calls itms-services to download and install the latest version.

Until iOS 8 when itms-services is called from an app the system would close the app and start the update process. Now there is an annoying change where the app isn't close anymore, the user doesn't know that the update process has started.

I would like to close my app after the update started like it was before iOS 8, but I don't know if this is possible, I thought to add an feedback saying that the app is been updated but this doesn't seem a good solution for me.

Does anyone know a better solution for this?

UPDATE: This app is also distributed at the App Store, so I can't use anything that could cause a rejection by Apple.

Thanks

Upvotes: 2

Views: 507

Answers (2)

James Moore
James Moore

Reputation: 399

You can call

[[UIApplication sharedApplication] performSelector:@selector(suspend)];

to put the app in the background right after opening your itms URL.

Upvotes: 2

Ian MacDonald
Ian MacDonald

Reputation: 14010

The update process in iOS 8 does not stop execution of the app until the update is complete. If you watch your home screen while the update is in progress, you will see two icons for the same app. After the update is complete, the "updating" icon will disappear and your app will have been updated.

If you're releasing an enterprise app, you're probably not going through Apple's review process. You might look into using private methods for closing your application when an in-app update flow is triggered. You could even cause a crash if you wanted (like try to access an index of an array out of bounds), though you'll probably get crash reports. ;)

Upvotes: 0

Related Questions