Archive Build iOS App with XCode Open
Asked Answered
O

1

7

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?

Ophir answered 5/4, 2015 at 14:37 Comment(4)
Did you figure out ?Haldane
Nope still disconnecting phone during build :(Ophir
Thank you so much for posting this, I couldn't figure out why my archive command suddenly stopped working!Leanto
I have the same issue and would be interested by a solution as well :/Cerebrospinal
T
12

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
Theodora answered 29/5, 2015 at 13:28 Comment(1)
Thank you! This seems to have fixed the issue for me.Betrothal

© 2022 - 2024 — McMap. All rights reserved.