Batch Build and Archive of iOS apps via Terminal

后端 未结 2 1985
慢半拍i
慢半拍i 2021-02-06 04:53

I am trying to simplify the build->archive->submit process for iOS app publishing. We have over 50 mobile apps that have nearly identical framework, but with different artwork a

2条回答
  •  孤独总比滥情好
    2021-02-06 05:41

    I had the same issue with the archive command, and found this question via Google. It would fail with this build command:

    xcodebuild -verbose -project $ProductName.xcodeproj -target $ProductName -configuration Release -sdk $SDK clean archive CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build" PROVISIONING_PROFILE="${DIST_PROVISONING_PROFILE}"
    

    Yet, it would succeed with this build command:

    xcodebuild -verbose -project $ProductName.xcodeproj -scheme $ProductName -configuration Release -sdk $SDK clean archive CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build" PROVISIONING_PROFILE="${DIST_PROVISONING_PROFILE}"
    

    The only difference is specifying the scheme in lieu of the target to build. If there is a sensible reason for this behavior, I'd enjoy hearing it.

    I'm running XCode 4.5.1 on Mac OS X 10.7.5

提交回复
热议问题