I want to use xcodebuild to archive one scheme with 3 different configurations, but the configuration is never changed with archive action.
Here is the content in .sh
xcodebuild -workspace myApp.xcodeproj/project.xcworkspace -sdk iphoneos -scheme myApp -configuration Distribution clean archive
xcodebuild -workspace myApp.xcodeproj/project.xcworkspace -sdk iphoneos -scheme myApp -configuration Inhouse clean archive
xcodebuild -workspace myApp.xcodeproj/project.xcworkspace -sdk iphoneos -scheme myApp -configuration Release clean archive
update: build action works fine
xcodebuild -workspace myApp.xcodeproj/project.xcworkspace -sdk iphoneos -scheme myApp -configuration Distribution clean build
xcodebuild -workspace myApp.xcodeproj/project.xcworkspace -sdk iphoneos -scheme myApp -configuration Inhouse clean build
xcodebuild -workspace myApp.xcodeproj/project.xcworkspace -sdk iphoneos -scheme myApp -configuration Release clean build
I am using Xcode4.5/iOS6.0, It works fine with build action(configuration changes each xcodebuild run), any solution?
The configuration for archive action has no effect, maybe it’s a bug of xcodebuild.
In order to change the configuration of archive, I write a shell script change the configuration of scheme each time before run archive command.
May not be the best solution, but solve the problem.
Here is the code: