Hemmelig
Hemmelig

Reputation: 794

Find out MNC, MCC

Kia Ora friends, I know there have been a couple of topics about it, but I am still confused about the following: I want to check out MNC and MCC on iPhone, using Swift 4 on iOS 11.1. My code is the following:

var mob = CTTelephonyNetworkInfo()
if let r = mob.subscriberCellularProvider { //creates CTCarrierObject
  print(r.mobileCountryCode!)
  print(r.mobileNetworkCode!)
}

At the moment, I am just getting the following error:

Could not successfully update network info during initialization.

I am just using it in iPhone Simulator, I haven't been testing it on a real phone yet.

So does anyone know, what I need to change? And is it just an error because the Xcode Simulator cannot simulate that or will I get the same error on real devices as well? Thank you!

Upvotes: 1

Views: 1618

Answers (0)

Related Questions