iOS app version and build numbers for iTunesConnect TestFlight

老子叫甜甜 提交于 2019-12-10 22:01:53

问题


My question relates to the restrictions in iTunes Connect for Version and Build number. We are only allowed 3 non-negative integers and the Build number has to be incremental.

I am setting up a Jenkins job to automatically upload my builds to iTunes Connect so that testers can then download them.

Problem: How do we ensure an incremental build number? Even if we did manually change it in Xcode before every commit (which seems wrong) there are more than one dev working on the project so there is no way we can all sync our commits and incremental numbers across the team.

Nice to have: My team works in several branches. It would be helpful if I could specify the branch name or some other description in the Build field. In the stand alone Test Flight (to be deprecated end of Feb 2015), we could upload a build with some letters.

Would love some input here!

And if iTunes Connect Test Flight is not the answer to distribute test builds, what other services are people using?

Thanks!


回答1:


In Jenkins there is a $BUILD_NUMBER parameter that lasts the life of the job. You can append this to the end of the build number parameter in the info.plist. If the beginning of the build number in info.plist is 3.1. then your real build number becomes 3.1.$BUILD_NUMBER from Jenkins. There's a program called plist_buddy (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/PlistBuddy.8.html) which you can use to edit the info.plist file.

It really doesn't matter if there are gaps in the sequence as long as it's incrementing. The 3.1. part would be manually managed so that the lead developer increments that at the beginning of a release. This approach assumes that you've got 1 job to do the build. If you have multiple jobs doing builds of the same app you could possibly use something like the date/time in Unix format, it's a large number and usually doesn't go backwards.



来源:https://stackoverflow.com/questions/28459535/ios-app-version-and-build-numbers-for-itunesconnect-testflight

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