Reputation: 19127
I am a novice in iOS development and doing the release builds for the first time.
In my team, we have two distribution profiles: Ad-hoc (for beta testing) and App store distribution. We use Test-Flight for beta testing. So, I archive (note it is a release build) using ad-hoc profile and then distribute it using the Test-Flight application. After my testing is done, how do I re-sign the build using App store distribution profile Or do I have to archive with XCode using the App store distribution profile?
Upvotes: 2
Views: 411
Reputation: 13619
I think the appropriate way would be to script this and perform a single build, and then two signed versions. That would allow you to have the app store signed version and the QA version, with the same code, just with different signings.
So, in your script, you could call xcodebuild to build your .app.
xcodebuild -configuration Distribution clean build
Then, with the .app created, you would run the following command twice, once with your QA signing, and once with the app store signing:
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_OUTPUT_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${QA_PROVISONING_PROFILE}"
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_OUTPUT_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${STORE_PROVISONING_PROFILE}"
You would have two signed IPAs with the same code, which is what you are looking for.
Upvotes: 1
Reputation: 343
Yes, you can archive with Xcode using the distribution profile.
To submit the release build to app store, sign it with distribution profile (for app store distribution, which is different from ad-hoc distribution profile): Go to Xcode->Organizer->select the last build you created with app store distribution profile -> Distribute -> Submit to the AppStore -> Login with your developer account.
Upvotes: 0