Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use any link in itms-service links for app distribution

I would like to use a different link than a direct link to a .plist file in itms-service links, but it seems iOS doesn't call it.

<a href="itms-services://?action=download-manifest&
url=http://example.com/app.plist">Install App</a>

This works, but if I try to call a script that outputs the .plist, I don't see a request coming in at the webserver.

<a href="itms-services://?action=download-manifest&
url=http://example.com/
checksomething?param=test">Install App</a>

Does anybody know why?

Maybe iOS checks if the link contains a .plist and doesn't call the link if it's not there?


OK, I know now that passing the URL to iOS fails:

if ([[UIApplication sharedApplication]canOpenURL:url]) {
    [[UIApplication sharedApplication]openURL:url];
    return NO;
}

Maybe the NSURL Object needs the parameter separate.

like image 738
spankmaster79 Avatar asked Dec 22 '22 05:12

spankmaster79


1 Answers

The question mark is a reserved character. You need to encode it as %3F. Same goes for the equals sign - it should be %3D.

like image 137
Jim Avatar answered Dec 28 '22 11:12

Jim