我正在尝试从具有.ipa和.plist的服务器安装应用程序。当我尝试拨打网址时
我收到了不支持的网址,错误代码为1002,我该怎么办。如何调用此网址。
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];
答案 0 :(得分:0)
我通常使用以下格式来实现它。
<a class="correct button" href="itms-services://?action=download-manifest&url=http://baseURL/app.plist">Distribution Link</a>
plist的内容结构如下:
访问:
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];
像魅力一样工作!
答案 1 :(得分:0)
UIWebView *webView = [[UIWebView alloc]init];
webView.delegate = self;
[self.view addSubview:webView];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:requestString]]];
嗨,我使用上面的格式来请求URL,我收到了要求安装和取消的警报,现在它正常工作。
请求网址:
“itms-services://?action = download-manifest&amp; url = itms-services://?action = download-manifest&amp; url = http:/oursite.com/myApp.plist”id =“text”