ios - 在飞行模式下,CTCarrier 中的 isoCountryCode 不返回 nil
问题描述
我在 iPhone 6(iOS 11.4.1)的 CTCarrier 中使用 isoCountryCode。插入 SIM 并打开飞行模式时,如果 isoCountryCode 返回为“in”的值。
根据Apple Docs,此属性的值是nil
以下任何一项适用。
- 设备处于飞行模式。(在我的情况下有效)
- 设备中没有 SIM 卡。
- 该设备不在蜂窝服务范围内。
需要帮助才能知道我是否正确理解了该文档。如果是,那么为什么我在飞行模式下将 isoCountryCode 设为“in”?
我已针对此问题向 Apple 提交了错误。
解决方案
是的,你理解正确。isoCountryCode 在飞行模式下应该为零。
推荐阅读
- django-templates - 无法在我的 html 模板中获取数据表单 selectpicker 类
- c - 如何在 C99 中制作数学对数函数?
- typescript - 单实例类中的变量没有改变
- c++ - 为什么(如果)条件不满足,但功能正在工作?
- windows - 使用 NASM 进行 Windows x64 汇编编程中未解析的外部符号 printf
- reactjs - 在 React 中从字符串渲染 HTML + JavaScript
- android - Flutter & Localization:本地化在 iOS 平台上不起作用
- json - Google Calendar API,事件每次返回 400 badRequest
- docker - 使用 dockerfile 持续检测文件更改并将文件从 yaml 转换为 html
- asp.net - 具有受限工作站的用户的 LDAP 身份验证问题