Changing or removing the carrier name on the iOS simulator using xcrun simctl status_bar
Asked Answered
R

1

7

As of iOS 13, SimulatorStatusMagic no longer works, but happily Apple have provided a first-party solution through simctl status_bar.

However I can't find any way to remove or change the "Carrier" text:

iOS 13 Status Bar

Setting --cellularMode notSupported removes it, but it also removes the cellular bars.

Is there any way to reproduce the previous functionality of SimulatorStatusMagic and remove or change just the carrier name?

Edit: Xcode 11.4 includes a new parameter to set the operator name, though it doesn't seem to work. The documentation provides the following:

    --operatorName <string>
         Set the cellular operator/carrier name. Use '' for the empty string.
Ruzich answered 27/9, 2019 at 14:39 Comment(1)
Yes, that's missing, even though Apple hides it in its own screenshots on the App Store :/ They show the battery percentage too, which is also unavailable with simctl status_bar.Meijer
N
11

I was able to remove the carrier name by passing not an empty string to operatorName but a string with just a space ' '

However, using operatorName alone will not have any effect. You also need to activate cellularMode.

For Example

xcrun simctl status_bar "iPhone 8 Plus" override --operatorName ' '

gives this result

enter image description here

whereas

xcrun simctl status_bar "iPhone 8 Plus" override --operatorName ' ' --cellularMode active

results in this

enter image description here

Nole answered 25/3, 2020 at 16:39 Comment(3)
It didn't work for me (in fact no combination of values for --operatorName has had any effect in the release version of Xcode). I've filed a bug with Apple and will keep the question updated with any responses.Ruzich
Confirmed, specifying --cellularBars (instead of --cellularMode) also works. If you want to remove the carrier name, you can make the gap smaller than a space by using a zero-width space: --operatorName `echo -ne "\u200B"` Ruzich
Didn't work for me, Only wifi logo disappeared and nothing changedCordovan

© 2022 - 2024 — McMap. All rights reserved.