简体   繁体   English

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

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

i am trying to install an app from the server having .ipa and .plist. 我试图从具有.ipa和.plist的服务器上安装应用程序。 when i try to call the url 当我尝试调用网址时

i am getting unsupported url, with error code 1002, what should i do. 我收到不受支持的url,错误代码1002,我该怎么办。 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];

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! 像魅力一样工作!

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. 嗨,我使用上面的格式来请求URL,我得到了警告,要求安装和取消,现在可以正常工作了。

Request URL: 要求网址:

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