gpt4 book ai didi

ios - 在 XCode 9 中启动模拟器(不是 headless 的)

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:36:35 25 4
gpt4 key购买 nike

我正在尝试使用 xcodebuild 运行我的 unitui 测试,例如:

$ xcodebuild -scheme "MyAppScheme" -destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=11.0' build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

问题是模拟器没有启动而是随意运行。

我知道 XCode 9 中引入了所谓的“ headless 模拟器”。关于如何使用 xcodebuild 运行测试并启动模拟器有什么想法吗?

最佳答案

据我所知,没有允许您在非 headless 模拟器上运行测试的选项。

但是,如果模拟器已经启动,测试将在该模拟器上运行,而不是在 headless 模拟器上运行。因此,您可以先启动模拟器,然后运行测试:

$ open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app && xcodebuild -scheme "MyAppScheme" -destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=11.0' build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

关于ios - 在 XCode 9 中启动模拟器(不是 headless 的),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46546760/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com