-
-
Save simrandotdev/1b44484ee98fb63eea433478f9227f99 to your computer and use it in GitHub Desktop.
Get carrier info from your iOS Device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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