1
votes

I am currently want to create a debug simulator build using xcodebuild command rather than xcode IDE.

however, I always see a "debug-iphoneos" folder is generated, which is for the real device. I expected the simulator output folder "Debug-iphonesimulator"

Can anyone take a look at my script and suggest why the script is not working for simulator?

xcodebuild -scheme "TestApp" -configuration "Debug" -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' -workspace TestApp.xcworkspace clean archive -archivePath build/TestApp PROVISIONING_PROFILE="$provisioningUUID" CODE_SIGN_IDENTITY="$codeSignIdentity"
2

2 Answers

2
votes

now I can run successfully as below:

xcodebuild -arch i386 -sdk iphonesimulator9.3 -workspace "$app.xcworkspace" -scheme "$scheme" -configuration "Debug" 
0
votes

You should run the following instead:

xcodebuild -arch i386 -sdk iphonesimulator9.1 -workspace [name].xcworkspace -scheme [targetName or ProjectName] ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64"

where iphonesimulator9.1 depends on which iPhone Simulator you installed.