【发布时间】:2015-09-16 00:04:48
【问题描述】:
我正在寻找在应用程序更新中创建,目前我的应用程序在我的亚马逊是 s3 存储桶中为我的 plist 文件创建了一个签名的 url,我还为我的 .ipa 文件创建了一个签名的 url 并将该签名的 url 存储在我的 plist 文件,如下所示:
应用中的 URL 调用:
NSMutableString *downloadURL = [NSMutableString string] ;
[downloadURL appendString:@"itms-services://?action=download-manifest&url="];
[downloadURL appendString:plistURL];
NSString *ipaDownloadString = [NSString stringWithString:downloadURL];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:ipaDownloadString]];
其中 ipaDownloadString 是附加到 item-services://?action 等的签名 url。
列表:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>https://bucket_name.s3-eu-west-1.amazonaws.com/ipa_name.ipa?AWSAccessKeyId=xxxxxxxxxxxxx&Expires=1435587320&Signature=xxxxxxxxxxxx</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.name.DropboxTest</string>
<key>bundle-version</key>
<string>1.1</string>
<key>kind</key>
<string>software</string>
<key>title</key>
<string>Dropbox Test</string>
</dict>
</dict>
</array>
</dict></plist>
当您将网址插入浏览器时,这些网址可以正常工作,但是,当点击链接时,应用程序不会像应有的那样下载应用程序。
我已尝试对 plist 中的 url 进行 url 编码,但无济于事。 plist 的内容类型为:text/plain ipa 有 content-type |: application/octet-stream
干杯, 本
【问题讨论】: