Question

I want to install an app from inside another app. I know it is possible with the following code:

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

My problem is that that the .plist is located in an area on the server where the user has to enter user credentials to access it. So when I execute this code, the user is asked for the credentials in Safari. But I don't want that. I want the app to enter the credentials.

I already tried to open the custom url scheme with an AFNetworking operation but it seems that it can´t handle custom url schemes because I get the error:

"Unsupported url"

So my question is: is there any way to use itms-services with user credentials or is there a workaround?

I also considered that maybe downloading the plist and executing it from an internal url could solve the problem, but I wanted to make sure that there is no easier way.

Thanks for reading my question!

Was it helpful?

Solution

After some time of experimenting I dont think it is possible to use itms-services with credentials. I ended up passing the credentials directly in the url with:

https://Username:Password@plisturl

In the plist I also added the credentials to the ipa URL. I don´t think it is a clean solution to add the credentials in clear text but it is the only solution I see at the moment.

Keep me updated if someone has a better solution.

OTHER TIPS

Does this help? The use of a token might be a little more secure than clear text.

https://docs.google.com/document/d/1H255a9QacH06Z9-239xAOEixbR967RmLu7-o0siRaJg/edit?pli=1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top