iOS SIWF SDK
Quick Reference
- SIWF iOS SDK Source Code + Demo App
- Swift Package:
https://github.com/ProjectLibertyLabs/siwf-sdk-ios.git
1. Installation
Requirements
- iOS 15.0 or later
- Swift Package Manager
Installing the SIWF SDK
You can install the SIWF SDK via Swift Package Manager (SPM):
- Open Xcode and navigate to File → Add Packages.
- Enter the repository URL:
https://github.com/ProjectLibertyLabs/siwf-sdk-ios.git - Select the latest stable version and add it to your project.
2. Displaying the SIWF Button
To create a SIWF Button, use the Siwf.createSignInButton method:
import Siwf
Siwf.createSignInButton(mode: .primary, authRequest: authRequest)
authRequest requires the Signed Request Payload in either base64url encoded or structured form.
3. Handling Authorization Callbacks
Use onOpenURL and Siwf.handleRedirectUrl to handle deep links and retrieve the authentication code.
4. Process Authorization Code
On your backend service, process the authorization code and start your session.
Resources: