Identifying the country code using mobile carrier in iPhone programmatically?

后端 未结 2 593
伪装坚强ぢ
伪装坚强ぢ 2020-12-30 15:57

Is there any way to get the country code from mobile network. Can we get the country name of the SIM present in the Device through code?

Please Help me out in this w

2条回答
  •  伪装坚强ぢ
    2020-12-30 16:25

    It is inside CoreTelephony

    CTTelephonyNetworkInfo *networkInfo = [[CTTelephonyNetworkInfo alloc] init];
    CTCarrier *carrier = [networkInfo subscriberCellularProvider];
    

提交回复
热议问题