xcodebuild
Terminal slow to start first time due to xcodebuild
Switch Apple Git to Git, the problem will go away. Run brew install git to do it. Relate link: https://blog.smittytone.net/2021/05/21/how-to-fix-xcodebuild-macos-terminal-slow-downs/ Another option is to accept the Xcode License sudo xcodebuild -license accept You can find this referring to the reference in the linked article.
Xcodebuild’ing a workspace and setting a custom build path
I’m not sure if this is a new option but the 5.0 release of xcodebuild has an option -derivedDataPath which allows you to specify the directory you’d like all the build products to sit in. For instance, passing -derivedDataPath build creates the folder build relative to where you ran xcodebuild from, and you can find … Read more
Building with xcodebuild Timed out waiting for /”runContextManager.runContexts”
checking the “shared” box in the “Manage Schemes” dialog moves the schemes to Project.xcodeproj/xcshareddata/xcschemes/Scheme.xcscheme so even if you have a clean checkout that has never been opened via the xcode ui, this will work. we use this so that buildbot can build our apps
How to display compiler output or custom build steps output when building with xcode?
You’ll find (and you can watch during the build) the complete build output in the Log Navigator. That’s the right most icon of the small icons just below the Run and Build buttons.
Xcode 4: Run tests from the command line (xcodebuild)?
Important Note With Xcode 5.1 (perhaps earlier Xcode as well) test is a valid build action. We were able to replace the entire hack below with a call to xcodebuild using the build action of test and with appropriate -destination options. man xcodebuild for more info. The information below is left here for posterity I … Read more
Setting a provisioning profile from within xcodebuild when making iPhone apps
Actually, you should be able to just add it to the XCode command line setting. xcodebuild [whatever other options you have] PROVISIONING_PROFILE=”[Your profile Unique ID here]” Build Settings from the command line are supposed to override everything, so this should win out over anything defined in the project or target.
xcodebuild -exportArchive: exportOptionsPlist error for key ‘method’: expected one of {}
I suspected xcodebuild tool initially, but it turned out the archive file was invaid. When I opened the archive file in Xcode and tried to export an ipa file manually, I noticed that “Upload to App Store” and “Validate” buttons were disabled. After clicking the “Export” button, it gave me two options: “Save Built Products” … Read more
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s)
You can set the “Build Active Architecture Only” and “Archs” values from command line itself. We set ARCHS=”armv7 armv7s” ONLY_ACTIVE_ARCH=NO. Eg /usr/bin/xcodebuild ARCHS=”armv7 armv7s” ONLY_ACTIVE_ARCH=NO -workspace -scheme …… This will free you from manually changing the values in your project settings.
Can an Xcode .mobileprovision file be ‘installed’ from the command line?
If you don’t want to download external dependencies (like Ben did), the following should work in most cases: uuid=`grep UUID -A1 -a adhoc.mobileprovision | grep -io “[-A-F0-9]\{36\}”` cp adhoc.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/$uuid.mobileprovision Note that a UUID is composed of hexadecimal digits so the correct range is [-A-F0-9] and not [-A-Z0-9]. Bonus: Download and install profiles Using … Read more