LoginSignup
7
5

More than 3 years have passed since last update.

iOSシミュレーターのステータスバーを変更する

Last updated at Posted at 2019-11-17

App Store Connect 用のスクリーンショットを用意するときにiOSシミュレーターのステータスバーをカスタマイズして好きな時間にしたいなどということがあると思います。

ライブラリで SimulatorStatusMagic というものもありますが、Xcode 11 からはコマンドから変更できるようになりました。

使い方

$ xcrun simctl help status_bar で詳細が見れます。

コマンド例

$ xcrun simctl status_bar "iPhone 11 Pro" override --time 9:41 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charged --batteryLevel 100

Simulator Screen Shot - iPhone 11 Pro - 2019-11-17 at 18.02.15.png

参考

https://www.jessesquires.com/blog/overriding-status-bar-settings-ios-simulator
https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes

7
5
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
7
5