iPhone - how to determine carrier of the device (AT&T, Verizon, etc?)

后端 未结 3 410
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 20:14

Is there a way to get information about the carrier of iPhones programmatically?

3条回答
  •  醉话见心
    2021-02-01 20:51

    Heres the Swift version:

    import CoreTelephony
    
    let phoneInfo = CTTelephonyNetworkInfo()
    let phoneCarrier = phoneInfo.subscriberCellularProvider
    print(phoneCarrier?.carrierName)
    

提交回复
热议问题