I'm trying to write a script that submits iOS apps to AppThwack (a 'real device' UI testing service). Their guidance is to use the Xcode GUI and build the app using the Build For > Testing
option in the Xcode Product
menu. This works, but I haven't been able to translate this into the xcodebuild
equivalent.
More generally, how do we determine what arguments Xcode is passing to xcodebuild (assuming it uses that tool).
xcodebuild builds one or more targets contained in an Xcode project, or builds a scheme contained in an Xcode workspace or Xcode project. Usage To build an Xcode project, run xcodebuild from the directory containing your project (i.e. the directory containing the projectname. xcodeproj package).
XCTest is the automation testing framework provided in Xcode with built-in support to help you set up and execute your tests. Testing is an important step of developing any project which can help you find bugs in your source code.
Aug 14, 2020. Since Xcode 9, Apple provides automatic code signing identity management from the command line by using the xcodebuild command. Using the “allowprovisioningupdates” flag, you can enable code signing; however you may get errors like: Your session has expired.
This is now possible as of Xcode 8 (in beta at time of writing). Use build-for-testing
.
Example:
xcodebuild -workspace <workspace> -scheme <scheme> -destination 'generic/platform=iOS' build-for-testing
To switch to a beta version of xcodebuild, use xcode-select
:
sudo xcode-select -switch /Applications/Xcode-beta.app/Contents/Developer
xctool has a flag called build-tests
that will do just that.
(As of this post, it is not currently Xcode 7 compatible, but they are working on it.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With