我希望创建应用内更新,目前我的应用在Amazon 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。
Plist文件:
<?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的内容类型为:application/octet-stream
谢谢, 本