1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Xcode内シミュレータの時間やキャリア電波強度、Wi-Fiの情報を編集する

1
Posted at

ステータスバー

どうやら、iOSデバイスのこの部分は「ステータスバー」と呼ばれるらしい。
アプリ審査用のスクショやアプリの広告でこのステータスバーを変更する必要が出たので、備忘録として残そうと思います。
image.png

ステータスバーの変更方法

1.ターミナルを開く
2.Xcodeでシミュレータを起動
3.下記コマンドを実行(bootedは"端末名"でも可)

xcrun simctl status_bar booted override --time "9:41" --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --batteryState charging --batteryLevel 100 

変更できる項目

--time

入力 結果
9:41 image.png
17:20 image.png

ステータスバーの時刻表示
自由に時刻を設定可能

--dataNetworkwifiデータ通信の種類
※この5文字列を出すにはなぜか、inactiveにする必要がありました。
ターミナルで実行するとエラーが出ますが、画面には正常に反映されます。

--wifiMode inactive
入力 結果
wifi image.png
5g image.png
4g image.png
3g image.png
LTE image.png
hide image.png
5g-uwb image.png
5g-uc image.png
5g+ image.png

--wifiModeactiveWiFiの状態

入力 結果
active image.png
inactive image.png
searching image.png

--wifiBars3WiFiの電波強度

入力 結果
3 image.png
2 image.png
1 image.png
0 image.png

--cellularModeactiveキャリアの状態

入力 結果
active image.png
searching image.png
failed image.png

--cellularBars4キャリアの電波強度

入力 結果
4 image.png
3 image.png
2 image.png
1 image.png
0 image.png

--batteryStatechargedバッテリー状態

入力 結果
charging image.png
charged image.png
discharging image.png

--batteryLevel100バッテリー残量

入力 結果
70% image.png
5% image.png

まとめ

とりあえず、またスクショでステータスバーを変更する時用に備忘録を作ることができました。
私だけではなく、皆様のチートシートになれるといいなと思いつつ終わります。

P.S.どうやらこれのGUIベースのものがあるみたいですが、
そこまでしたくない人などもいると思うので、そういう方のためになれば🙏

参考:https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?