Is there any ways to detect the roaming status on iOS 6?

后端 未结 2 1117
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 06:27

My application using below methods to detect roamming in iOS 4 and 5.

NSString *carrierPListSymLinkPath = @\"/var/mobile/Library/Preferences/com.apple.carri         


        
相关标签:
2条回答
  • 2020-12-31 07:08

    Facing the same problem here since iOS6 beta 1, since that version /var/mobile/Library/Preferences/com.apple.operator.plist sym-link is no more reversable.

    No other device-only way are public now, in the meanwhile the unique solution is to check for the ip via geo-ip, as Trausti Thor said, or checking for the ip class if you are developing an app for a single carrier.

    0 讨论(0)
  • 2020-12-31 07:13

    This is an answer I got from apple :

    "Indeed. Unfortunately these files were never documented as public API and, as such, were never intended to be used by third party apps. In a lot of cases such restrictions are enforced, either technically by the iOS sandbox or administratively by App Review. However, neither of these processes is perfect, and there are occasions where apps end up doing things they shouldn't be doing. Unfortunately this puts these apps in a difficult position when the enforcement improves, as has happened in this case.

    As to direct workarounds there really isn't one. The only public telephony APIs on iOS are provided by the Core Telephony framework. Its CTTelephonyNetworkInfo class gives you information about the user's 'home' cellular server, not about the network that they are roaming on."

    They suggest you use geo-ip check.

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