簡體   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