[英]Calling Snapshot from the command line (FastLane Tools > Snapshot)
出于我的目的,我从脚本调用各种工具并传入我用作输入的适当环境变量。 我在传递devices
参数和languages
参数时遇到问题。
例子:
snapshot \
--workspace "MyWorkspace.xcworkspace" \
--scheme "MyScheme" \
--output_directory "MyOutputDirectory" \
--clear_previous_screenshots \
--stop_after_first_error \
--devices (['iPhone 4s', 'iPhone 5', 'iPhone 6', 'iPhone 6 Plus'])
以上导致设置devices
参数时出错。
如何将这些 arrays 传递给此工具?
您无法使用命令行将设备/语言传递给snapshot
。 而是将语言和设备添加到Snapfile
或Fastfile
我知道为时已晚,但我想在这里补充一点,您可以通过以下方式从命令行传递设备
将选项添加到您要从命令行访问的通道
lane :screenshots do |options|
capture_screenshots(scheme:"QuickgetUITests",devices:options[:devices])
end
然后从命令行传递如下参数
fastlane screenshots devices:"iPhone 8"
注意:您也可以传递其他选项,例如语言
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.