Unable to retrieve CarrierName

后端 未结 4 1592
醉梦人生
醉梦人生 2021-02-04 12:08

Using iPhone6, Xcode 8.1, running iOS 10.1.1, executing the following Swift code I keep getting

Unable to retrieve CarrierName

Error mes

相关标签:
4条回答
  • 2021-02-04 12:29

    As a solution to a different issue I did the following. Whether this fixes it or just suppresses the msg I don't know, as I was getting the msg but it was never crashing my app.

    In Xcode

    • Click on your active scheme name right next to the Stop button
    • Click on Edit Scheme....
    • in Run (Debug) select the Arguments tab
    • in Environment Variables click +
    • add variable: OS_ACTIVITY_MODE = disable

    credit here : https://stackoverflow.com/a/40160779

    0 讨论(0)
  • 2021-02-04 12:30

    Maybe this is a litle dumb but check that XCode Maps capabilities is active :) .

    0 讨论(0)
  • 2021-02-04 12:31

    On my iOS device this happens because Settings->Privacy->Location Settings<(app name)->Allow Location Settings isn't set to either "Never" or "While Using the App". Once I set it - it works.

    0 讨论(0)
  • 2021-02-04 12:46

    Tray adding CoreTelephony to the AppDelegate maybe? You ViewController implementation is not accessing any CoreTelephony framework methods, thus your problem lies elsewhere.

    0 讨论(0)
提交回复
热议问题