Skip to content

Instantly share code, notes, and snippets.

@dfelber
Created June 14, 2016 14:53
Show Gist options
  • Save dfelber/7df6923aaade15eae80c52d4f7fa5a6d to your computer and use it in GitHub Desktop.
Save dfelber/7df6923aaade15eae80c52d4f7fa5a6d to your computer and use it in GitHub Desktop.
Get carrier info from your iOS Device
import CoreTelephony
let info: CTTelephonyNetworkInfo = CTTelephonyNetworkInfo()
guard let carrier: CTCarrier = info.subscriberCellularProvider else {
// No carrier info available
return
}
print(carrier.carrierName)
print(carrier.mobileCountryCode)
print(carrier.mobileNetworkCode)
print(carrier.isoCountryCode)
print(carrier.allowsVOIP)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment