addPlan(with:completionHandler:)
Starts the provisioning process for a specified eSIM.
Declaration
func addPlan(with request: CTCellularPlanProvisioningRequest, completionHandler: @escaping @Sendable (CTCellularPlanProvisioningAddPlanResult) -> Void)func addPlan(with request: CTCellularPlanProvisioningRequest) async -> CTCellularPlanProvisioningAddPlanResultParameters
- request:
A Ctcellularplanprovisioningrequest that identifies the eSIM to download.
- completionHandler:
A completion handler that executes after processing the request. The parameter passed to the completion handler indicates whether the request succeeded, failed, or ended in an unknown state.
Discussion
Once your app calls this method, an iOS wizard guides the user through the process of installing and configuration an eSIM.
Installing an eSIM in the Background
The user may send your app to the background prior to completing eSIM installation. To ensure your app has an opportunity to execute the completion handler and get the result of the installation, use beginBackgroundTask(expirationHandler:) to perform the eSIM installation as a background task.