SecurePass SDK

  • Updated
Back to SecurePass Overview

License required: Engage

SecurePass SDK

The SecurePass SDK lets you embed WiFi profile enrolment directly into your own branded iOS or Android app. Visitors authenticate once in your app and auto-connect at every venue in your estate - silently, in the background.

No development resource? Use the Purple App instead.
The Purple App delivers the same seamless auto-connect experience - free on all licence tiers, no development work required.

How the SDK works

The SDK handles two things: fetching the WiFi profile from Purple's Access API, and installing it on the visitor's device. Once installed, the OS handles all future connections automatically.

1
User authenticates in your app
The visitor logs in or signs up as they normally would. Your existing auth flow is unchanged.
2
SDK fetches the WiFi profile
The SDK calls Purple's Access API and retrieves a signed WiFi profile. An active internet connection is required at this stage.
3
Profile installs on the device
The OS handles installation. On iOS the user sees a brief system prompt; on Android it completes automatically.
Auto-connect from every visit onwards
The device connects at every venue in your estate - even if the app is closed or the user is not logged in.

Integration

Your development team manages the build. Current authentication methods can remain in place alongside the SDK.

Minimum requirements: Xcode 15.3 · iOS deployment target 15.0+ · Swift Package Manager

1. Add the dependency

In Xcode, add the following repository via Swift Package Manager:

git@bitbucket.org:purplestudios/wifi-sdk-ios-spm-public.git
2. Enable capabilities
  • Hotspot
  • Keychain Sharing - with Keychain Group com.apple.networkextensionsharing
3. Initialise and install profiles
import WifiAuth import WifiAuthCore let wifiAuth = WifiAuth( apiKey: "YOUR_API_KEY", apiHost: "api.purple.ai" ) // Call after user authentication try await wifiAuth.installPasspointProfiles(tags: nil)
4. Uninstall profiles
await wifiAuth.uninstallPasspointProfiles()

Use PlistConfigurationFetcher to read your API key and hostname from a properties list file at runtime - do not hardcode them in client-side code. API credentials are provided by Purple.

Minimum requirements: Android 11+ (API level 30) · Android Studio · Kotlin · Gradle

1. Add the Maven repository and dependency
// build.gradle.kts repositories { maven { url = uri("https://europe-west4-maven.pkg.dev/container-registry-328210/ai-purple-maven-publictest") } } dependencies { implementation("ai.purple.wifisdk:auth:VERSION") // replace VERSION }
2. Add API credentials to AndroidManifest.xml
<application> <meta-data android:name="ai.purple.api_key" android:value="${api-key}" /> <meta-data android:name="ai.purple.api_host" android:value="${api-host}" /> </application>
3. Initialise WifiAuth in onCreate()
import ai.purple.wifisdk.auth.WifiAuth import androidx.activity.ComponentActivity class MainActivity : ComponentActivity() { private lateinit var wifiAuth: WifiAuth override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) wifiAuth = WifiAuth(activity = this) } }
4. Fetch and install profiles
try { wifiAuth.fetchConfiguredWifiNetworks().let { wifiAuth.registerWifiNetworks(it) wifiAuth.installWifiNetworks() } } catch (e: Exception) { // handle exception }

Android 12+: If a user rejects the install prompt, they must manually grant permission via Settings - Wi-Fi Control - [your app] before the prompt reappears. Include a button in your app that opens Settings to help users complete this step.

Full API references, changelogs, and advanced configuration are available in the developer docs: iOS  Android

Common questions

  • No. Once the profile is installed, the device connects automatically regardless of whether the user is logged into your app.
  • The profile does not transfer between devices. When the user logs into your app on a new device, call the install method again to install a fresh profile.
  • Yes. The SDK is additive - it does not replace your existing authentication flows. Visitors who enrol via the SDK auto-connect; all others continue through the portal as normal.
  • No. The SDK runs a one-time profile installation and then becomes dormant. All subsequent connections are handled by the OS - the SDK has no ongoing background activity.
  • Yes. An active internet connection is required at the time of profile installation to fetch the profile from Purple's Access API. Once installed, no internet is needed to auto-connect.
Share online:
Was this article helpful?
0 out of 0 found this helpful