I have small problem with implementing xcodebuild command test at CI. I have tests related to specific device language, in xcode I can set "Arguments Passed On Launch" to -AppleLanguages (language). Can I pass that argument using xcodebuild?
My script looks like this
xcodebuild -workspace MyApp.xcworkspace -scheme "MyAppTests" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' test
Thanks!
Launch arguments are probably most commonly used as input to command line tools. Whether we're creating a new folder using mkdir , running a custom build using xcodebuild , or performing network requests using curl - launch arguments provide an easy way to pass string-based input into a command line program.
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.
xcodebuild
is for build your app. You can use this command to run your app with specific language.
xcrun simctl launch <deviceid> <appid> -AppleLanguages "(pt-BR)"
Hera a sample with all steps to buil and run your app:
xcodebuild -sdk iphonesimulator8.4 -arch i386 install DSTROOT=YourAppFolder
xcrun instruments -w "iPhone 6 (8.4 Simulator)"
xcrun simctl install booted YourAppFolder/Applications/YourApp.app
xcrun simctl launch booted com.yourdomain.yourapp -AppleLanguages "(pt-BR)"
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