Reputation: 20169
I am currently able to adhoc build my iOS app using the following command:
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration AdHoc archive -archivePath /Users/andrewherrick/Desktop/MyApp.xcarchive
It works great when my phone isn't connected to my Mac having XCode recognize it. However, when it's plugged in it always bombs out:
Reason: You cannot archive for the iOS Simulator platform.
Is there anyway I can modify the build command to allow me to NOT have to disconnect my phone everytime I want a fresh adhoc build?
Upvotes: 7
Views: 2173
Reputation: 121
try using the -destination parameter. e.g.:
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration AdHoc archive -archivePath /Users/andrewherrick/Desktop/MyApp.xcarchive -destination generic/platform=iOS
Upvotes: 12