Initialize the BlackBerry Spark SDK in your iOS app
BlackBerry Spark SDKin your
- Import theBlackBerrySecuritymodule into your class.import BlackBerrySecurity
- Initialize theBlackBerrySecurityframework and invokeenableSecurity.SecurityControl.shared.enableSecurity()
- Retrieve the identity token of your authenticated user from your IDP.The ID token is a JSON Web Token (JWT), which is a cryptographically-signed, Base64-encoded JSON object. To retrieve the ID token from your IDP, you must have already authenticated the user.If you are usingFirebase, the ID token can be retrieved by following the Firebase instructions to retrieve ID tokens on clients. Other IDPs that are compliant withOpenID Connecttypically provide an endpoint and client library which returns the ID token.
- Provide the identity token to theBlackBerry Spark SDKruntime.SecurityControl.shared.provideToken(token: idtoken)
- Confirm that theInitializationStateof the runtime is 'active'.
Using the BlackBerry Spark SDK API reference, configure your application to be notified when a threat is detected.