2

I'm trying to get an IPA downloadable through a website. From reading around I see this is done itms-services.

My issue is my link in php is not working - I have a feeling it's down to the syntax but i can't figure it out. I tried url encoding etc but no luck.

Any ideas?

echo '<a href="itms-services://?action=download-manifest&url=http://localhost:8888/hockey/hockey/appname_type/info.plist">Click here to donwnload</a></br>';
userMod2
  • 8,312
  • 13
  • 63
  • 115

5 Answers5

6

This is what Apple answers themselves on this question:

Yes, the itms:// type links don't work in the simulator.

Community
  • 1
  • 1
Markus Breuer
  • 117
  • 1
  • 6
2

You'll need to url encode just the url. So instead of

http://localhost:8888/hockey/hockey/appname_type/info.plist

you use this

http%3A%2F%2Flocalhost%3A8888%2Fhockey%2Fhockey%2Fappname_type%2Finfo.plist

J.C.
  • 893
  • 14
  • 27
  • Hmm. Out of curiosity, what happens when you click the link? – J.C. Nov 26 '13 at 19:03
  • 1
    Safari on my iOS simulator gives the error Cannot Open Page… Safafri could not open the page because the address is invalid – userMod2 Nov 26 '13 at 19:04
  • I just tried one of my links using the simulator and I get the same error you do. If you have a device available, try testing it out on that. – J.C. Nov 26 '13 at 19:07
  • Tried on device - I get the error could not connect to localhost – userMod2 Nov 26 '13 at 19:12
  • In your info.plist file, is the value of url ```http://localhost:8888/hockey/hockey/appname_type/info.plist``` – J.C. Nov 26 '13 at 19:18
  • Nope my info.plist has the .ipa address – userMod2 Nov 26 '13 at 19:54
  • Hi - I got it working ! :-) So you were correct with your first answer. The problem I had i.e. cannot connect to localhost was because accessing my mobile (i.e. localhost through my wifi) i had to speciift the IP address and just use the word localhost – userMod2 Nov 26 '13 at 19:59
2

I "think" the URL must now be HTTPS vs HTTP, per Apple security change.

trante
  • 33,518
  • 47
  • 192
  • 272
Tom
  • 21
  • 2
0

Is your url to your ipa-file in the info.plist correct? It needs to be the absolute url, f.e.

<key>url</key> <string>http://localhost:8888/hockey/hockey/appname_type/info.ipa</string>

and it shouldn't be in a .htpasswd secured directory.

andreasbecker.de
  • 533
  • 2
  • 12
0

Unless you are running a jailbroken iOS device that's got it's own web server, a localhost url will notwork. I suspect your localhost reference works in Safari on your mac because it is running a web server that is serving up the files.

You'll need to specify the IP address for the Mac in your link, like

<a href="itms-services://?action=download-manifest&url=http://192.168.0.100:8888/hockey/hockey/appname_type/info.plist">Click here to donwnload</a></br>';

but replace 192.168.0.100 with the IP address of your Mac.

Note that this won't work in the simulator, since you cannot install apps through the itms-services

wottle
  • 13,095
  • 4
  • 27
  • 68