I ended up adding a new job in Jenkins which only builds an .xcodearchive
. That job belongs to a pipeline and is the last task to be executed. The command used to build the archive is:
xcodebuild -scheme ${JK_SCHEMA_NAME} -archivePath ${JK_OUTPUT_DIR}/${JK_ARCHIVE_NAME} clean archive "CODE_SIGN_IDENTITY=${JK_CODE_SIGN_IDENTITY}" "GCC_PREPROCESSOR_DEFINITIONS=${GCC_PREPROCESSOR_DEFINITIONS} ${JK_GCC_PREPROCESSOR_DEFINITIONS}" "PROVISIONING_PROFILE=${JK_PROVISIONING_PROFILE_UDID}"
This way I can make sure the flow to deliver an app from commit to final binary for the store is completely automated (or at least doesn't need human interaction). The version numbers are correctly set, and that there are no changes in source code or compiling options that can alter the final archive uploaded to the store.