Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I update an iOS Enterprise App in the background like an App Store app can?

I have an iOS enterprise app that we are wirelessly distributing to our devices. Currently the app polls our server once a day to see if there is an app update. If there is, we try to install it by having the app call the following code:

        NSURL *installUrl = [NSURL URLWithString:[NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", plistUrl]];
        [[UIApplication sharedApplication] openURL:installUrl];

This causes the app to prompt the user with an alert dialog to install the update. If they click install, the app closes and the update is downloaded and installed.

I am wondering if there is anything for enterprise apps for iOS 7 similar to the AppStore's automatic updates? I would like to be able to update our app without the user having to press an update button and be able to update at a time when the user won't have to wait for it to install.

like image 565
lehn0058 Avatar asked Nov 07 '13 14:11

lehn0058


People also ask

Can iOS update in background?

The "Background App Refresh" feature lets apps update even when they're closed, but it takes up battery life. To turn off the "Background App Refresh" feature on your iPhone or iPad, head to the "General" menu in the Settings app. You can turn off background refreshing for every app, or just specific apps.

How long will an iOS app run in the background?

Tasks are under a strict time limit, and typically get about 600 seconds (10 minutes) of processing time after an application has moved to the background on iOS 6, and less than 10 minutes on iOS 7+.

What is enterprise app iOS?

Enterprise apps are special kinds of iOS apps that are not distributed through Apple's iTunes Store. They are distributed by you or your organization. Note: Enterprise apps are only distributed to an internal audience (ie your sales or marketing staff). Before You Begin.


2 Answers

The answers in these questions will give you a correct answer:

  • Auto-updated iOS application for enterprise distribution
  • Update In-House Apps -- iOS Enterprise Developer Program
  • Updating iOS apps automatically with an MDM + Enterprise license

There is a solution for this though by Stephen McMahon, but I did not test it.

http://www.techhui.com/profiles/blogs/auto-updating-enterprise-or-ad-hoc-ios-applications

like image 107
Legoless Avatar answered Sep 21 '22 08:09

Legoless


EDIT: I realise now that I misread the brief, the OP was asking for background automatic updates. Not possible for enterprise apps, but (relatively) easy to do upon first open. I'll leave this here as this was the info I came looking for when I found this question.


Here's what I did for my project. I exported the app in Enterprise mode against our In House Distribution certificate and uploaded the folder to public web space. Have your app check for updates (the method to use is an exercise for the developer) and when one is detected, open a web browser to a URL like the following:

itms-services://?action=download-manifest&url=https://www.yourcompany.com/path/to/manifest.plist

You'll see a screen not unlike the one below:

Confirmation image to install enterprise app

If you use Cordova/PhoneGap to develop your app, be sure to include an allow-navigation rule for these types of apps.

like image 44
Aaron Mason Avatar answered Sep 22 '22 08:09

Aaron Mason