0

i am trying to install an app from the server having .ipa and .plist. when i try to call the url

i am getting unsupported url, with error code 1002, what should i do. how to call this url.

NSLog(@"requestString : %@",requestString);
self.responseData=[[NSMutableData alloc]init];
NSMutableURLRequest *request = [NSMutableURLRequest
                                requestWithURL:[NSURL URLWithString:requestString]];
[request setHTTPMethod:@"GET"];
[request setValue:loginCredentials forHTTPHeaderField:@"Authorization"];    
NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
[cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
[request setHTTPShouldHandleCookies:YES];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[connection start];
Tirth
  • 7,801
  • 9
  • 55
  • 88
Logunath
  • 477
  • 1
  • 8
  • 20

2 Answers2

0

I usually use the below format to get it work.

<a class="correct button" href="itms-services://?action=download-manifest&url=http://baseURL/app.plist">Distribution Link</a>

And the contents of plist is structured as shown below:

PLIST

Access:

self.responseData=[[NSMutableData alloc]init];
NSMutableURLRequest *request = [NSMutableURLRequest
                            requestWithURL:[NSURL URLWithString:requestString]];
[request setHTTPMethod:@"GET"];
[request setValue:loginCredentials forHTTPHeaderField:@"Auth"];    

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request   delegate:self];
[connection start];

Works like charm!

San
  • 1,796
  • 13
  • 22
0
UIWebView *webView = [[UIWebView alloc]init];
webView.delegate = self;
[self.view addSubview:webView];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:requestString]]];

hi, i used the above format to request for the URL and i got the alert asking for install and cancel, now its working fine.

Request URL:

"itms-services://?action=download-manifest&url=itms-services://?action=download-manifest&url=http:/oursite.com/myApp.plist" id="text"

Logunath
  • 477
  • 1
  • 8
  • 20