Skip to content

Truphone/betterroaming-ios-sdk

Repository files navigation

BetterRoaming IOS Package

Installation

XCode

Usage

Import the package

import BetterRoamingSdk

// ...

var manager = BetterRomaingManager()

Check eSim support

let supported: Bool = await manager.checkEsimSupport()

Generate and download an eSim

let body = [
    "subscriber": [
        "email": "...",
        "first_name": "...",
        "last_name": "...",
        "country_of_residence": "GB"
    ],
    "device": [
        "operating_system": "ios"
    ],
    "tenant": "...",
    "externalID": "...",
    "activation_token": "..."
]

let result: BRInstallEsimResult = try await manager.generateESimAndDownload(body: body)

/**
    Result status can be 4 different values 
     - .unknwon -> user probably cancelled or something went wrong
     - .fail -> installation failed
     - .success -> installation succeeded (you should check result.iccid)
     - .cancel -> user cancelled the installation (ios 17 or more)
*/

Open contact page

try await manager.openContactPage(params: ["tenant_id": "..."])

Open status page

try await manager.openStatusPage(iccid: iccid)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published