1
2

More than 3 years have passed since last update.

iOS Simulatorのステータスバーの表記をカスタマイズする(iOS13)

Last updated at Posted at 2020-04-23

参考元: https://www.jessesquires.com/blog/2019/09/26/overriding-status-bar-settings-ios-simulator/

確認環境

Xcode: 11.4.1
iOS: 13.4.1

手順

iOSシミュレータが起動した状態で、ターミナルで下記のコマンドを実行

xcrun simctl status_bar "iPhone SE (2nd generation)" override --time 10:00 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --operatorName "docomo" --batteryState charged --batteryLevel 100

Before:
before.png

After:
after.png

オプション

--time <string>
  Set the date or time to a fixed value.
  If the string is a valid ISO date string it will also set the date on relevant devices.

--dataNetwork <dataNetworkType>
  If specified must be one of 'wifi', '3g', '4g', 'lte', 'lte-a', or 'lte+'.

--wifiMode <mode>
  If specified must be one of 'searching', 'failed', or 'active'.

--wifiBars <int>
  If specified must be 0-3.

--cellularMode <mode>
  If specified must be one of 'notSupported', 'searching', 'failed', or 'active'.

--cellularBars <int>
  If specified must be 0-4.

--operatorName <string>
  Set the cellular operator/carrier name. Use '' for the empty string.

--batteryState <state>
  If specified must be one of 'charging', 'charged', or 'discharging'.

--batteryLevel <int>
  If specified must be 0-100.
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2