I'm developing an app that handles phone numbers and bumped into a problem that I have to pop up a warning message if a user is trying to make a roaming call (to make it clearer, I'm implying the user is in another province/state). I found this article(Is there any way to determine if the iphone is roaming?) from stackoverflow but it's quite old.
Has Apple provided any api for this? If Apple has, what's the name of the api/class to use? If hasn't, is that article still the only solution for this problem?
Thank you!
No there is no API that will allow you to detect if the user is roaming. Also the tutorial you point to is for jailbroken devices. It will not work on an Appstore app.
You can read out the users carrier with the CTCarrier
class. But it clearly states that you will not be able to detect roaming:
Discussion
This string is provided by the carrier and formatted for presentation to the user. The value does not change if the user is roaming; it always represents the provider with whom the user has an account.