7

I'm coding an app with heavy network usage. I've been told to warn users for costs but only when in roaming mode. I know theres some way to know when the phone is roaming comparing two undocumented files on jailbreaked iphones. But I need to find out how to for non jailbreaked phones. BTW found nothing at SCNetworkReachability api.

Ty!

Martha
  • 1,070
  • 1
  • 12
  • 29
  • possible duplicate of [Is there any ways to detect the roaming status on iOS 6?](http://stackoverflow.com/questions/12473490/is-there-any-ways-to-detect-the-roaming-status-on-ios-6) – Pascal Apr 09 '14 at 18:53

2 Answers2

4

There's no way to know if they're roaming using the API. You can find out if they're on Wifi or Cellular, but that's it.

Randall
  • 14,691
  • 7
  • 40
  • 60
1

You can get the user's home network country code from CoreTelephony. There are lists to map MNCC ( mobile network country code) to a real country code.

Next get your location, from CoreLocation, and get an address from that using geolocation.

Compare one to the other, and there you have it.

Not 100% reliable near borders, but good enough for a warning message.

Gordon Dove
  • 2,537
  • 1
  • 22
  • 23