4

I am using isoCountryCode in CTCarrier in iPhone 6 (iOS 11.4.1). The value if isoCountryCode is returned as "in" when the SIM is inserted and the Airplane mode is turned on.

As per Apple Docs, the value for this property is nil if any of the following apply.

  • The device is in Airplane mode. (valid in my case)
  • There is no SIM card in the device.
  • The device is outside of cellular service range.

Need help to know if I understood the document correctly. If yes, then why am I getting isoCountryCode as "in" in Airplane Mode?


I have filed a bug with Apple for this issue.

https://bugreport.apple.com/web/?problemID=47138150

Sahil Khanna
  • 4,262
  • 8
  • 47
  • 72

2 Answers2

0

Yes, you understand it correctly. isoCountryCode should be nil in flight mode.

Markk
  • 86
  • 3
0

Apple Docs are not clear enough in this case. isoCountryCode does not change when you roaming. It means that OS should only get your carriers code only once. Probably it will be nil when you insert new SIM card when phone Airplane mode is turned on. I'm not an expert in this field, but most probably SIM can hold MCC/MNC code which is statically linked with country. Some test: https://stackoverflow.com/a/5829063/1980246

Timur Bernikovich
  • 5,660
  • 4
  • 45
  • 58