xcode command line test with argument passed at launch(带有参数的 xcode 命令行测试在启动时传递)
问题描述
我在 CI 实施 xcodebuild 命令测试时遇到了小问题.我有与特定设备语言相关的测试,在 xcode 中我可以将启动时传递的参数"设置为 -AppleLanguages(语言).我可以使用 xcodebuild 传递该参数吗?
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?
我的脚本是这样的
xcodebuild -workspace MyApp.xcworkspace -scheme "MyAppTests" -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' test
谢谢!
推荐答案
xcodebuild
用于构建您的应用程序.您可以使用此命令以特定语言运行您的应用程序.
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)"
这篇关于带有参数的 xcode 命令行测试在启动时传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:带有参数的 xcode 命令行测试在启动时传递


- Android - 拆分 Drawable 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01