Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild command line hangs

The following command hangs on my osx:

xcodebuild -scheme myscheme clean archive -archivePath /tmp  

This command yields two output lines, and then hangs:

User defaults from command line:
    IDEArchivePathOverride = /tmp

Now, this project does NOT have a workspace generated as it was created from a cordova command line (cordova build ios). The only way around it is to open xcode and close it. this generates a workspace and then the above command succeeds.

Did anyone experience something similar and know a way out of this? Any way to generate that workspace from the command line?

like image 889
Tal Avatar asked Dec 06 '15 21:12

Tal


2 Answers

I had the same problem and the only way of fixing it was to open the project from the command line, wait, and close it again after a certain time.

open "My Project.xcodeproj"
sleep 10
killall Xcode
xcodebuild -scheme "My Project" clean archive "build/MyProject"

Not nice, but works for me.

like image 197
Anytoe Avatar answered Oct 18 '22 05:10

Anytoe


Try setting the scheme to be 'shared'.

This can be done by going to the 'Manage Schemes...' and checking the 'Shared' checkbox.

Apple documents this process here: https://developer.apple.com/library/ios/recipes/xcode_help-scheme_editor/Articles/SchemeShare.html

like image 23
danB Avatar answered Oct 18 '22 04:10

danB