简体   繁体   English

是否有可能以编程方式知道 SIM 卡 state - 适用于 iPhone

[英]Is it possible to know the SIM CARD state - for iPhone programmatically

I am working for Application where I need to know what is the STATE of the sim card inserted.我正在为我需要知道插入的 sim 卡的 STATE 是什么的应用程序工作。

Is it possible for iPhone to know what is the current state for the inserted sim card?? iPhone是否可以知道插入的SIM卡的当前state是什么?

Thanks in advance提前致谢

I don't think you can, Apple does not expose any information regarding the sim, the cell radio, the network you are on, etc.我认为您不能,Apple 不会公开有关 sim、蜂窝无线电、您所在的网络等的任何信息。

What you can do is all in Core Telephony Framework .你能做的一切都在Core Telephony Framework中。 If you want something more than the Core Telephony Framework, it may be possible using some unofficial way, but the application will be rejected if you want to submit to the Apple Store.如果您想要的不仅仅是 Core Telephony Framework,可以使用一些非官方的方式,但如果您想提交到 Apple Store,应用程序将被拒绝。 Because it takes into account the user's privacy and security.因为它考虑到了用户的隐私和安全。

All the informations available about the telephony in the official SDK are in the Core Telephony Framework .官方 SDK 中有关电话的所有可用信息都在Core Telephony Framework中。 If you want to check for the state of the SIM card you can for instance call the CTCarrier methods which will return nil if the SIM is not currently available (if there is no SIM inserted, if the iPhone is in Airplane mode or if it is outside of cellular service range).如果你想检查 SIM 卡的 state,你可以调用 CTCarrier 方法,如果 SIM 当前不可用(如果没有插入 SIM、iPhone 处于飞行模式或蜂窝服务范围之外)。

Yes it is possible and as per Appstore review guideline, they stated that Apps that collect user or usage data must have a privacy policy and secure user consent for the collection.是的,这是可能的,并且根据 Appstore 审查指南,他们声明收集用户或使用数据的应用程序必须具有隐私政策并获得用户对收集的同意。 This includes—but isn't limited to—apps that implement HealthKit or other health/medical technologies, HomeKit, Keyboard extensions, Apple Pay, Stickers and iMessage extensions, include a login, or access user data from the device.这包括但不限于实现 HealthKit 或其他健康/医疗技术、HomeKit、键盘扩展、Apple Pay、贴纸和 iMessage 扩展、包含登录或从设备访问用户数据的应用程序。 Your app description should let people know what types of access (eg location, contacts, calendar, etc.) are requested by your app, and what aspects of the app won't work if the user doesn't grant permission.您的应用描述应该让人们知道您的应用请求哪些类型的访问(例如位置、联系人、日历等),以及如果用户不授予权限,应用的哪些方面将无法工作。

Read: https://developer.apple.com/app-store/review/guidelines/#data-collection-and-storage Section 5.1.1 Data Collection and Storage阅读: https://developer.apple.com/app-store/review/guidelines/#data-collection-and-storage第 5.1.1 节数据收集和存储

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM