After searching everywhere I found there is a way to add eSIM in iPhone using the following API
func addPlan(with: CTCellularPlanProvisioningRequest, completionHandler: (CTCellularPlanProvisioningAddPlanResult) -> Void)
I don't know why but completion handler not returning the result of CTCellularPlanProvisioningAddPlanResult just printing the following error.
Domain=NSCocoaErrorDomain Code=4099 "The connection to service named
com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo=
{NSDebugDescription=The connection to service named
com.apple.commcenter.coretelephony.xpc was invalidated.
I want to know how this API works, You can see my code below
let ctpr = CTCellularPlanProvisioningRequest()
ctpr.address = "SMDP+"
ctpr.confirmationCode = ""
ctpr.eid = ""
ctpr.iccid = ""
let ctcp = CTCellularPlanProvisioning()
ctcp.addPlan(with: ctpr) { (result) in
print(result)
}
I am using CoreTelephony framework
Any help would be appricated
After checking other apps I found that GigSky is doing the same, anyone knows how they are doing?
UPDATE:
As of now I found the entitlement request URL check below
https://developer.apple.com//contact/request/esim-access-entitlement
I requested but apple is not responding.