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

风流意气都作罢 提交于 2019-12-11 10:41:23

问题


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. 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. 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.

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. Thanks.


回答1:


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. I got this fixed, uploaded to iTunes Connect and distributed via 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.

  • I created an entitlements .xcent file using the python script contained in the 5th comment here: https://forums.adobe.com/thread/751326 to do this. 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.
  • The entitlements need to match the provisioning profile, I checked those using this: https://developer.apple.com/library/ios/technotes/tn2318/_index.html#//apple_ref/doc/uid/DTS40013777-CH1-TNTAG68.
    • 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. 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

Also 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 rezip the Payload.



来源:https://stackoverflow.com/questions/30791284/alter-minimum-os-version-of-ipa-without-xcode-ios-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!