iOS SDK overview
The Wi-DAS iOS SDK is a native Swift Package that adds Wi-DAS Passpoint onboarding to your app. A
small WiDAS facade gets a signed client certificate and installs a Passpoint profile. You call
four verbs; everything else is internal.
Two ways to issue
Before Wi-DAS signs a certificate, something has to vouch for the request. You pick which when you configure the SDK:
- Through your Broker (recommended). Your own backend service vouches for the user you've signed in. The SDK hands its signing request to your Broker, and your Broker gets the certificate. It's the same route the Android and Windows SDKs use. See Brokered issuance for what running a Broker involves.
- Through App Attest. Apple's App Attest proves the request came from your genuine app, and the SDK talks to Wi-DAS directly. There's no backend to run, but it only tells Wi-DAS which app is asking, not who the user is.
Everything else is the same on both routes: the device key, the signing request, the Passpoint install and the four verbs.
We'll remove App Attest support from the SDK in the near future, leaving brokered issuance as the only route. Build new integrations on a Broker, and if your app uses App Attest today, plan to move it across.
At a glance
| Distribution | Swift Package Manager, as a prebuilt XCFramework (github.com/Ameriband/widas-ios) |
| Minimum OS | iOS 14 |
| Language | Swift (async/await) |
| Issuance | Through your Broker (recommended), or App Attest (being retired) |
| Passpoint install | NEHotspotConfiguration |
| Telemetry | None |
| Version | 0.5.x |
The public surface
import WiDAS
// Configure once. Your Broker adapter relays the signing request to your Broker.
let widas = WiDAS(
clientId: "client-acme",
broker: MyBroker(endpoint: brokerEndpoint, userAccessToken: signIn.accessToken),
keychainAccessGroup: "<TeamID>.com.apple.networkextensionsharing"
)
// Advisory status — never throws. Check it before connecting.
let status = await widas.status() // .none | .valid | .expired | .revoked
// Onboard the user. Each call issues a new certificate, so only when there's no usable one.
if status.state != .valid {
try await widas.connect(user: "user-42", requestedValidity: "P365D")
}
// Remove the installed profile.
try await widas.disconnect()
To use App Attest instead, leave out broker:. The rest of the code doesn't change.
The four verbs
| Verb | What it does |
|---|---|
init(clientId:broker:keychainAccessGroup:) | Configures the SDK for brokered issuance. Ships no secret; clientId is public. |
init(clientId:keychainAccessGroup:) | Configures the SDK for App Attest instead. |
connect(user:requestedValidity:) | Onboards the user, issuing a new certificate. Call it when status() reports .none, .expired or .revoked, not on every launch. |
status() | Advisory certificate status. Never throws. |
disconnect() | Removes the installed Passpoint profile. |
Next steps
- Installation — add the package.
- Setup — the Hotspot Configuration entitlement, the Keychain group, and getting registered for your chosen route.
- Usage — implementing your Broker adapter and wiring the four verbs into your app.
- Error handling — the
WiDASErrorcases and what to do about each.