简体   繁体   English

无需 XCode,iOS 8+ 即可更改 IPA 的最低操作系统版本

[英]Alter Minimum OS Version of IPA without XCode, iOS 8+

This is a long shot but... I've been mistakenly left with an IPA instead of an XCode project by a teammate who's gone off on holiday and it urgently needs uploading to iTunes Connect.这是一个很长的镜头,但是......我被一个度假的队友错误地留下了 IPA 而不是 XCode 项目,它迫切需要上传到 iTunes Connect。 The problem, when I tried to upload the IPA via Application Loader the Minimum OS version was set to 5.0, and I got an error that this was too low, had to be at least 5.1.1.问题是,当我尝试通过 Application Loader 上传 IPA 时,最低操作系统版本设置为 5.0,我收到一个错误,提示这太低了,必须至少为 5.1.1。 I went through the process here: Change app Version with only IPA file provided (no xcode) to edit the Minimum OS via the Info.plist but I encountered the same issue as the final comment on this question, the resulting IPA will upload but will not install.我在这里完成了这个过程: 仅提供 IPA 文件(无 xcode)更改应用程序版本以通过 Info.plist 编辑最小操作系统,但我遇到了与此问题的最终评论相同的问题,生成的 IPA 将上传但将不安装。

I've done a ton of searches for other solutions but have only managed to find old, pre-iOS 8 answers, all the same solution as within the link above - If anyone knows if its still possible to alter the minimum OS version of an IPA without being able to do this through XCode much appreciate the help.我已经对其他解决方案进行了大量搜索,但只能找到旧的 iOS 8 之前的答案,所有解决方案都与上面链接中的解决方案相同 - 如果有人知道是否仍然可以更改最低操作系统版本IPA 无法通过 XCode 执行此操作,非常感谢您的帮助。 Thanks.谢谢。

Thanks to phix23 who gave a tip to check the error messages when trying to install, it turned out to be an issue with the entitlements.感谢 phix23 在尝试安装时提供了检查错误消息的提示,结果证明是权利问题。 I got this fixed, uploaded to iTunes Connect and distributed via TestFlight.我解决了这个问题,上传到 iTunes Connect 并通过 TestFlight 分发。

There were a couple of steps I followed to sort this out which I think are worth noting here incase anyone else needs to do this.我遵循了几个步骤来解决这个问题,我认为这里值得注意,以防其他人需要这样做。 After unzipping the IPA and editing the Info.plist to change the Minimum OS, I needed to sort out the entitlements.解压 IPA 并编辑 Info.plist 以更改最小操作系统后,我需要整理权限。

  • I created an entitlements .xcent file using the Python 2 script contained in the 5th comment here to do this.我使用此处第 5 条评论中包含的Python 2 脚本创建了一个 entitlements .xcent 文件来执行此操作。 I added the entitlements <key>beta-reports-active<key><true/> (to use TestFlight) and <key>get-task-allow<key><false/> & <key>aps-environment<key><string>production<string> (because these were in my provisioning profile) to the python script before generating the entitlements .xcent.我添加了权利<key>beta-reports-active<key><true/> (使用 TestFlight)和<key>get-task-allow<key><false/> & <key>aps-environment<key><string>production<string> (因为这些在我的配置文件中)在生成权利 .xcent 之前添加到 python 脚本。
  • The entitlements need to match the provisioning profile, I checked those using the commands found here .权利需要与配置文件匹配,我使用此处找到的命令检查了这些权利。
  • There is also a file inside the *.app called something like archived-expanded-entitlements.xcent so I also edited this to match the entitlement .xcent file I generated with the python script using a text editor. *.app 中还有一个文件,名为archived-expanded-entitlements.xcent所以我还编辑了它以匹配我使用文本编辑器使用 python 脚本生成的权利.xcent文件。 Just to be sure.只是要确定。

When resigning I left out the --resource-rule option (which didn't seem to work for me) but included --entitlements option, pointing to the entitlement .xcent file .辞职时,我省略了--resource-rule选项(这似乎对我不起作用)但包含了--entitlements选项,指向权利.xcent文件。

Also, it's worth noting that if the IPA had a Payload and a Symbols directory when unzipped, select them both and compress into an archive to rezip, rather than just rezipping the Payload.另外,值得注意的是,如果 IPA 在解压缩时有一个 Payload 和一个 Symbols 目录,请将它们都选中并压缩到一个存档中以重新压缩,而不是仅仅重新压缩 Payload。

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

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