New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Simulator 16.1+ donnot support status bar time customization #21255
Comments
As i know the status bar time override issue in Xcode 13 and iOS 16.1 to 16.4 is unresolved, with no specific information available from Apple yet. PaybyPlateMa Pay Online |
On XCode 15, simulator on iOS 17.4, the status bar time override is indeed silently failing because of "&> /dev/null" at the end of the command line. If you execute the command line without throwing away errors (by removing "&> /dev/null"), you'll get the following error :
I ended up using override_status_bar_arguments as a workaround, with a proper ISO date (note the .000 missing in the original date/time string) override_status_bar_arguments "--time 2007-01-09T09:41:00.000+01:00 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --operatorName '' --cellularBars 4 --batteryState charged --batteryLevel 100" |
New Issue Checklist
Issue Description
Since Xcode 13 and the iOS 16.1 simulator, up until the current 16.4, the status bar override for time doesn't work. Although this could get resolved soon, we still don't have any specific information from Apple on that specific subject.
Saagar Jha did a beautiful summary of the issue and suggests a workaround as well : https://mastodon.social/@[email protected]/110247648243275098
Workaround
Some people have been using the iOS 16.0 simulator to fix this issue. While this is entirely possible, it requires recreating your simulators, making sure your app runs on 16.0 properly and possibly not showcasing more recent features.
I have been able to use Saagar's workaround using the following changes :
in
snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb
, methodoverride_status_bar
in your
fastlane/Snapfile
:reinstall_app=false
override_status_bar true
override_status_bar_arguments "--time 9:41 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --operatorName '' --cellularBars 4 --batteryState charged --batteryLevel 100 --dataNetwork wifi"
(note the 9:41 time instead of an ISO time which didn't seem to work)launch the snapshots using
SIMCTL_CHILD_SIMULATOR_RUNTIME_VERSION=16.0 fastlane snapshot
Some parts can be done on the user side, but not the modification in
override_status_bar
. Those should be relatively harmless, donnot in themselves include any workaround, but allow users to prepare for a workaround while Apple fixes this.Limitations
Because this requires the simulator to be launched using
xcrun simctl boot
instead of any other way, if the simulator is launched before hand, either while uninstalling the app, or adding medias, the workaround is moot.Other tries
I tried setting up a global env var on my system and let everything run as is, but it didn't seem to work. Further investigation would be required.
Command executed
fastlane snapshot
Environment
✅ fastlane environment ✅
Stack
System Locale
fastlane files:
No Fastfile found
No Appfile found
fastlane gems
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
generated on: 2023-05-06
The text was updated successfully, but these errors were encountered: