1

I am working on an app where I deploy the .ipa file and manifest.plist on my server and from there I try to install the app to my iphone.

The app is initially installed but I need to check if a latest version is available on the server. I have done this part and now wish to install the latest .ipa from the server directly to my phone without redirecting user to the html page of the server

Found some links on stack overflow, especially this: Download and install an ipa from url on iOS I have done this:

 let endPointURL = NSURL(string: "itms-services://?action=download-manifest&url=myUrlString")
        UIApplication.sharedApplication().openURL(endPointURL!)

I get unsupported URL exception. Can anyone tell me how I can achieve this? Is there any other way to directly start installing the upgrade without navigating to the actual html page?

Community
  • 1
  • 1
user2604897
  • 193
  • 1
  • 3
  • 13
  • Your method works for me, are you sure you have the URL set correctly? Does it download if you open the link in Safari? – James P Jul 19 '16 at 10:49
  • From safari i am able to download the app by hitting the URL. it was infact a problem with URL. But from app I get an error saying safari cannot download this file. however is there no way that i dont get redirected safari as i am now? – user2604897 Jul 19 '16 at 11:07
  • Also when I hit only my url from code i get the safari page and error however the above itms-services://?action=download-manifest&url=myUrlString seems to be doing nothing.. even safari doesnt open – user2604897 Jul 19 '16 at 11:21

2 Answers2

0

It's just for testing purpose. Only registered devices are allowed to do this. Only single way is there to download your app and its app store. You can give app store link and it will redirect user to appstore.

And if you want to test just use test flight it's easiest way.

Your linked question also tells that. Just for testing purpose it's possible now.

Dhruv Khatri
  • 803
  • 6
  • 15
  • I know.. this is just for inhouse testing only.. whenever i put a new version of the app i want all the users to be able to get it by just clicking ok in the alert displayed in the app itself. – user2604897 Jul 19 '16 at 11:02
0

I found this same issue before.

A workaround for this is to new up a webview (you can hide it if you wish) and then give the request to the webview to perform. When the request loads you will then be shown the popup asking if you wish to download the app.

Swinny89
  • 7,273
  • 3
  • 32
  • 52
  • Thank you for the suggestion. In this case , however, I think my issue was to do with the fact that i was using simulator to test this.. thanks anyway – user2604897 Jul 20 '16 at 06:33
  • No problem, glad you've fixed your issue. – Swinny89 Jul 20 '16 at 07:05
  • Yes.. however, Its not quite what i needed. I am being redirected to a URL with .ipa file. However i wished to start the installation directly. On the MAC, when i hit the url , the .ipa starts downloading automatically.. is there any way to achieve the same in iphone? – user2604897 Jul 20 '16 at 10:26
  • As per my answer, new up a webview and load the request. It will show the popup to download – Swinny89 Jul 20 '16 at 10:49
  • I have tried this... The link to ipa when loaded to the webView gives a lot of junk text on the screen .. – user2604897 Jul 20 '16 at 11:07
  • Is it signed with an enterprise certificate? The URL also needs to be under SSL using https – Swinny89 Jul 20 '16 at 11:09
  • nope.. it is not an enterprise certificate.. the URL is under SSL though – user2604897 Jul 20 '16 at 11:51
  • Is the binary signed with a profile that has the UDID of the device you're trying to install it on? – Swinny89 Jul 20 '16 at 12:22
  • Yes.. the device UDID is there on the provisioning profile – user2604897 Jul 21 '16 at 04:43