繁体   English   中英

在AdHoc分发中下载.ipa文件时出错

[英]Error in downloading the .ipa file in AdHoc distribution

我试图从具有.ipa和.plist的服务器上安装应用程序。 当我尝试调用网址时

我收到不受支持的url,错误代码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];

我通常使用以下格式来使其正常工作。

<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];

像魅力一样工作!

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&url = itms-services://?action = download-manifest&url = http:/oursite.com/myApp.plist” id =“ text”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM