CoreTelephony eSIM功能在设备上不起作用 [英] CoreTelephony eSIM functions not working on device

查看:64
本文介绍了CoreTelephony eSIM功能在设备上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将eSIM集成到现有的iOS运营商应用程序中时遇到了一些麻烦.

I've been having some trouble implementing eSIM into an existing iOS carrier-application.

设置

  • 该应用已收到 public-cellular-plan 权利,了解的是使我可以使用eSIM功能的权利的CoreTelephony.
  • 我已将CoreTelephony框架导入了应用程序的目标中: General>与其他框架(如CoreData等)相同,标记为请勿嵌入的框架,库和嵌入式内容.
  • 我已经在调用的类中导入了库 import CoreTelephony
  • 我正在通过iPhone XR上的Xcode运行具有正确配置文件的开发版本,该版本具有有效的数据计划,因此我确定它支持它.
  • The app has received the public-cellular-plan entitlement which I understand is the entitlement giving me access to the eSIM functions of CoreTelephony.
  • I've imported the CoreTelephony framework in the app's target: General > Frameworks, Libraries, and Embedded Content which is marked as Do not Embed, same as other frameworks like CoreData and such.
  • I've imported the library in the class making the calls import CoreTelephony
  • I'm running a development build with the correct profile via Xcode on an iPhone XR, which has a data plan active so I'm sure it supports it.

问题
假设所有这些,我现在应该可以访问eSIM函数,例如 supportsCellularPlan ,但不幸的是,它似乎不起作用:

The problem
Supposedly with all this, I should now have access to the eSIM functions like supportsCellularPlan but unfortunately it doesn't seem to be working:

let provisioning = CTCellularPlanProvisioning()
let supportsESIM = provisioning.supportsCellularPlan()

print("\(supportsESIM)") 
// This prints false but should be true as the XR supports eSIM

我也尝试通过TestFlight使用分发配置文件,但结果相同.

I've also tried via TestFlight with the distribution profile but same result.

关于我在做什么错的任何想法吗?

Any ideas as to what I'm doing wrong?

推荐答案

所以...经过大量的尝试,我可以解决一个小问题.

So... after a lot of trial an error I was able to solve this little issue.

要了解有关 supportsCellularPlan()的两件事(当然还有eSIM的权利).

There are 2 things to know about supportsCellularPlan() (other then having the eSIM entitlements of course).

第一:
您需要启用WiFi才能使其正常工作,因为它似乎需要与Apple连接才能进行一些检查.

First:
You need to have WiFi enabled for it to work as it seems to need to connect with Apple for some checks.

第二个:
它要求将 CarrierDescriptors 正确输入到您的 info.plist 中,因为它是与运营商绑定的.

Second:
It requires the CarrierDescriptors to be entered correctly in your info.plist as it is carrier-bound.

一旦有了它,它就会按预期工作.

Once you have that, it should work as expected.

这篇关于CoreTelephony eSIM功能在设备上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆