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!