Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[snapshot] Add option for clean status bar #15124
Motivation Behind Feature
In order to produce a consistent appearance of the status bar in screenshots, developers often use Status Bar Magic to modify the displayed information.
With Xcode 11, this will be supported by the simulator and, thus, removing the need for an external dependency:
(taken from the release notes for Xcode 11 beta 5)
Add an additional option to the snapshot config which will let the simulator launch with the set of parameter for a clean status bar.
Alternatives or Workarounds
An alternative would be the give the user more freedom in defining the parameters for the simulator. Here we could have an option in the snapshot config to specify the parameters for the simulator manually.
Here are my naming suggestion:
You have to decide which approach aligns the best with fastlane's other functionalities.
Unfortunately, I don't have the time right now to work on this.
After looking into the command, it would probably even make sense to implement both your suggestions - the
If someone tackles this, the documentation should be updated as well to point to this new parameter: https://github.com/fastlane/fastlane/blob/875e3482906044a4f9806dc869c8813d3a2e9a57/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md#use-a-clean-status-bar
I used this very nice solution which uses scheme pre- and post-actions -> Fixing Simulator Status Bars for App Store Screenshots With Xcode 11 and iOS 13
Works also with automation :)
This command works when building and running apps from Xcode:
But however, fastlane snapshot seems to reset the status bar every time running, here is the possible dirty fix for that