对于某些国家/地区,iPhone 上的 CTCarrier 返回了错误的 ISO

发布于 2024-11-18 20:08:34 字数 620 浏览 5 评论 0原文

这不是一个问题,而是给可能使用 CTCarrier 的其他开发人员的一个注释。

我一直在开发一个应用程序,它需要读取 SIM 卡的 iso 以确定该应用程序正在使用的国家/地区(至少是 SIM 国家/地区)。该文档提到了有关 isoCountryCode 属性的以下内容:

此属性使用 ISO 3166-1 国家/地区代码表示形式。

然而,从我的测试和部署来看,返回的 iso 似乎不是几个国家/地区的标准 ISO 3166-1(不确定这是否是 Apple 将信息存储在 SIM 中的运营商的错误)!所以我必须进行一个翻译阶段来解决不正确的 ISO。以下是我到目前为止所得到的列表(一旦我得到新的不正确的 iso,我将继续更新它):

Country:             ISO I get        Expected ISO
----------           ----------       -------------
UK                      uk                 gb     
Japan                   ja                 jp

干杯 自动对焦

This is not a question but rather a note for other developers who might be using CTCarrier.

I have been developing an app which requires reading the iso of the SIM card to determine the country the app is being used in (at least the SIM country). The doc mentions the following about the isoCountryCode property:

This property uses the ISO 3166-1 country code representation.

From my tests and deployment however it appears that the returned iso is not the standard ISO 3166-1 for several countries (not sure if this is Apple's mistake of the carrier who stored the info in the SIM)! So i had to do a translational phase to resolve the incorrect ISO's. The following is the list i have got to so far (will keep updating it once i get new incorrect iso's):

Country:             ISO I get        Expected ISO
----------           ----------       -------------
UK                      uk                 gb     
Japan                   ja                 jp

Cheers
AF

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断肠人 2024-11-25 20:08:34

UK 由英国保留(并且是标准的附录),因此这是一个灰色区域;)

JA 应该是 Jamacia - 为什么您认为这是日本?

来自此处的信息: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

UK was reserved by the the United Kingdom (and is an an appendix to the standard) so that's a grey area ;)

JA should be Jamacia - why do you expect this to be Japan?

Info from here : http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文