Reputation: 579
I am using Snapshot from the FastLane suite.
For my purposes I am calling the various tools from scripts and pass in the appropriate environment variables I am using as the inputs. I am having trouble passing in the devices
parameter as well as the languages
parameter.
Example:
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'])
The above results in an error when setting devices
parameter.
How do I pass these arrays to this tool?
Upvotes: 1
Views: 394
Reputation: 27
I know its too late but I want to add here that you can pass devices from command line in following way
add option to your lane which you gonna access from commandLine
lane :screenshots do |options|
capture_screenshots(scheme:"QuickgetUITests",devices:options[:devices])
end
then pass argument like below from command line
fastlane screenshots devices:"iPhone 8"
Note: You can Pass Other Options as well same way such like languages
Upvotes: 0
Reputation: 11751
You can't pass the devices / languages to snapshot
using the command line. Instead add the languages and devices to your Snapfile
or Fastfile
Upvotes: 3