Archive iOS app with Xcode Open

Currently, I can adhoc create an iOS application 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 is not connected to my Mac if Xcode recognizes it. However, when it connects to it, it always explodes:

 Reason: You cannot archive for the iOS Simulator platform. 

Anyway, can I change the build command so that I DO NOT have to disconnect my phone every time I need a new adhoc build?

+6
source share
1 answer

try using the -destination option. eg:.

 xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration AdHoc archive -archivePath /Users/andrewherrick/Desktop/MyApp.xcarchive -destination generic/platform=iOS 
+9
source

Source: https://habr.com/ru/post/984704/


All Articles