The Trinsic Swift UI Library provides ways to launch verification sessions directly in your Swift and Objective-C projects.
This library must be paired with an api library as part of a full integration.
You can find a full example using this library in the samples folder.
See the Trinsic docs for more detailed information on how to start integrating with our identity acceptance network.
This library supports launching both Widget and Hosted Provider Sessions.
You must specify a redirectUrl when creating either kind of Session, and that redirectUrl must use a custom scheme which you register against your app (see below).
This library provides only minimal support for Direct Provider Sessions.
Specifically, it can be used only to execute Sessions which return a launchMethod of LaunchBrowser and a collectionMethod of CaptureRedirect.
All other interaction methods are not supported by this library and will require additional effort to implement; please contact Trinsic for guidance.
Add the Trinsic repository https://github.com/trinsic-id/sdk-swift-ui as a dependency.
Add a reference to the TrinsicUI pod to your Podfile with the latest version (see the shield at the top of the readme) and run pod install
pod 'TrinsicUI', '~> [latest version]'
This library makes use of ASWebAuthenticationSession on iOS and macOS.
Therefore, you must register a custom scheme against your app on both iOS and macOS in order for the library to be able to capture the results of a session.
This custom scheme should be globally unique to your organization and application.
An example of a good custom scheme might be acme-corp-shopping-app-trinsic.
Select your app's target and on the info tab in XCode add the scheme you selected.
Import TrinsicUI into your view:
import TrinsicUICreate an instance of TrinsicUI and launch a session. You can retrieve the launch url from a trusted backend that can reach out to the Trinsic servers. See our API libraries.
let trinsicUI = TrinsicUI()
let result = try await trinsicUI.launchSession(launchUrl: "[REPLACE_ME]", callbackURL: "[REPLACE_ME]")Our SDKs follow the Semantic Versioning ("SemVer") scheme.
For example, the version number 1.13.0 has a major version of 1, a minor version of 13, and a patch version of 0.
Breaking changes are only introduced alongside a new major version.
Any issues, inquiries, and feature requests can be sent to support@trinsic.id, or feel free to open a GitHub issue here.