The process of taking AppStore screenshots is automated using a UI Testing bundle and Snapshot tool, a part of Fastlane tools.
The screenshot script uses the real account token to log in, which is provided via Xcode build configuration.
-
Create the build configuration using a template file:
cp ios/Configurations/Screenshots.xcconfig.template ios/Configurations/Screenshots.xcconfig
-
Edit the configuration file and put your account token without quotes:
vim ios/Configurations/Screenshots.xcconfig
-
Make sure you have rvm installed.
-
Install Ruby 2.5.1 or later using
rvm install <VERSION>
. -
Install necessary third-party ruby gems:
cd ios bundle install
Run the following command to take screenshots:
cd ios
bundle exec fastlane snapshot
Once done all screenshots should be saved under ios/Screenshots
folder.