1

In my app I have a button to update the same app by ad hoc distribution. In that link I do the next action:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"itms-services://?action=download-manifest&url=http://url/manifest.plist"]];

So then it appears the alert message and I tap ok, and then the app is closed and it starts the installation.

the first question is: That´s this way the best way.

I´d like to manage the errors that it can happen, for example, It interrupts the connection.

Or if had an error, and it can not install the app, I´d like run the previous version.

CodeLikeBeaker
  • 20,682
  • 14
  • 79
  • 108
xarly
  • 2,054
  • 4
  • 24
  • 40

1 Answers1

0

Yes this is the best way and you can't check for error's.

iOS is handeling the download ans install of the new version and you can't access this process.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
  • Thanks for your reply. In that case, If I can download the .ipa with my app (with NSURLConnection, etc...) could I install it from my app? executing the .ipa or something similar. – xarly Nov 12 '12 at 14:26
  • No, you need to let iOS handle the downloading and installing of the App. It will not work other any other way (unless you are writing for jailbroken devices) – rckoenes Nov 12 '12 at 14:32
  • Ok, I see, the problem is if the downloading fails, the previous version disappears, and you can only run the app when you accomplish to download the new version. – xarly Nov 12 '12 at 14:38
  • have you tried [TestFlight](http://testflightapp.com) this comes with a library that that tell the user there is an update for the ad-hoc version. You also have a list of the app that can run on your device, so if the download fails you can use that list to try it again. – rckoenes Nov 12 '12 at 14:41
  • I´ve heard of it. I thought that solution was to test the apps, in my case is to distribute by Enterprise license. I haven´t tested yet. I will investigate. Thanks rckoenes, and thanks for your time. – xarly Nov 12 '12 at 16:32
  • It will not work for Enterprise apps, you want the [HocekyKit](http://hockeykit.net/) for Enterprise. – rckoenes Nov 13 '12 at 08:23