iOS
URL Scheme Configuration
Add your custom URL scheme to Info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>mygame</string>
</array>
</dict>
</array>
Or configure in Unity:
- Go to Edit → Project Settings → Player → iOS
- Expand Other Settings
- Add your URL scheme under Supported URL schemes
Deep Link Handling
The SDK handles deep links automatically. Ensure your redirect URIs match:
// Must match your URL scheme
passport = await Passport.Init(
clientId: "YOUR_CLIENT_ID",
environment: Environment.Sandbox,
redirectUri: "mygame://callback", // ← mygame matches Info.plist
logoutRedirectUri: "mygame://logout"
);
Build Settings
- Set Target minimum iOS Version to 13.0 or higher
- Enable Automatically Sign or configure your provisioning profile
iOS-Specific Notes
- The login flow uses
ASWebAuthenticationSession, which shows a system alert: “[App] Wants to Use ‘immutable.com’ to Sign In”. This cannot be removed or customized.
- Deep links work via URL schemes (not Universal Links) for PKCE security.
Android
AndroidManifest Configuration
Add the intent filter for deep linking:
<activity android:name="com.immutable.passport.PassportActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mygame" android:host="callback" />
</intent-filter>
</activity>
<!-- For logout redirect -->
<activity android:name="com.immutable.passport.PassportLogoutActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="mygame" android:host="logout" />
</intent-filter>
</activity>
Unity 6 Configuration
If using Unity 6 with the new Android activity system:
- Go to Project Settings → Player → Android → Configuration
- Set Application Entry Point to
Activity (not GameActivity)
- Remove
UnityPlayerGameActivity from your AndroidManifest if present
Build Settings
- Set Minimum API Level to 24 or higher
- Set Target API Level to 33 or higher
- Enable Custom Main Manifest if you need to modify AndroidManifest.xml
Android-Specific Notes
- The login flow uses Chrome Custom Tabs
- Ensure Chrome is installed on test devices
- The SDK automatically handles the manifest merge for most cases
WebGL
Authentication Flow
WebGL uses a popup-based flow instead of redirects:
#if UNITY_WEBGL
await passport.LoginWithPopup();
#else
await passport.Login();
#endif
Build Settings
- Go to Project Settings → Player → WebGL → Publishing Settings
- Enable Decompression Fallback
- Set Compression Format to Gzip or Disabled for development
Hosting Requirements
- Host on HTTPS (required for secure authentication)
- Configure CORS headers if calling external APIs
- Add your hosting domain to redirect URIs in Hub
WebGL Template
For custom templates, ensure the Immutable scripts are included:
<!-- In your index.html template -->
<script src="Build/{{{ LOADER_FILENAME }}}"></script>
WebGL-Specific Notes
- Popup blockers may interfere with login. Ensure
LoginWithPopup() is called from a user gesture (button click)
- localStorage is used for session persistence
- Some browser features may be restricted in WebGL context
macOS
URL Scheme Configuration
Add to Info.plist (similar to iOS):
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>mygame</string>
</array>
</dict>
</array>
Build Settings
- Set Target minimum macOS Version to 10.15 or higher
- Sign your application for distribution
Windows
Default WebView
The SDK uses Unity Web Browser (UWB) by default on Windows.
IL2CPP Support
The default WebView doesn’t support IL2CPP. For IL2CPP builds, use a custom WebView like Vuplex. See Advanced Configuration.
Build Settings
- Set Scripting Backend to Mono for default WebView compatibility
- Or configure a custom WebView for IL2CPP
Handle platform-specific flows:
async void Login()
{
#if UNITY_WEBGL && !UNITY_EDITOR
await passport.LoginWithPopup();
#else
await passport.Login();
#endif
}
Testing
| Platform | Recommended Testing Method |
|---|
| iOS | Physical device or Simulator |
| Android | Physical device or Emulator |
| WebGL | Local HTTPS server or hosted build |
| Windows | Editor or standalone build |
| macOS | Editor or standalone build |
Testing in Unity Editor uses the desktop WebView. Always test on target platforms before release.
Next Steps