CoreTelephony eSIM functions not working on device
So... after a lot of trial an error I was able to solve this little issue.
There are 2 things to know about supportsCellularPlan()
(other then having the eSIM entitlements of course).
First:
You need to have WiFi enabled for it to work as it seems to need to connect with Apple for some checks.
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.
CarrierDescriptors Example:
<key>CarrierDescriptors</key> <array> <dict> <key>MCC</key> //Mobile country code <string>’mnc value’</string> <key>MNC</key> // Mobile network code <string>’mnc value’</string> </dict> </array>
You can find the correct MCC/MNC values here: https://www.mcc-mnc.comBtw for some reason, it also works for me, when there is just random value "xxx" for example.But it needs to be there in the plist.