If your Template starts with tmpl_, you’re on v1.
We will stop making updates to v1 on December 31, 2022. You will still be able to create inquiries, but no new features or fixes will be available. We recommend moving to v2 for access to the latest product improvements- please see migration to v2 section or contact us.
If you want to dive right in to the API documentation, you can do so here.
The Persona Inquiry flow lets you securely and seamlessly collect your user’s information.
Integrate the Persona Inquiry flow directly into your iOS app with our native SDK.
To integrate the Persona Inquiry SDK in your iOS app you can use Swift Package Manager, CocoaPods or download the XCFramework for manual integration or for use with Carthage.
Your app needs to support iOS 11.0 or later.
To install the SDK with Swift Package Manager:
+ to add a packagehttps://github.com/persona-id/inquiry-ios.git, and click NextTo install the SDK with CocoaPods, add PersonaInquirySDK as one of your target dependencies in your Podfile:
Please be sure to run pod update and use pod install --repo-update to ensure you have the most recent version of the SDK installed.
Unfortunately Carthage (as of 0.37.0) does not appear to support framework binaries containing multi-architecture platforms. If you’re using Carthage, you can download the pre-built XCFramework and integrate it using the steps outlined below.
The SDK is released as an XCFramework which makes manually installing the SDK a straightforward process:
Assets triangle and download the PersonaSDK.xcframework.zip filePersona.xcframework folder into your Xcode projectDestination has Copy items if needed ticked and that it will be added to the correct target.FinishThat’s it!
In addition to importing the dependency, you also need to modify your Info.plist:
Info tabNSCameraUsageDescription) entry (if not already present) to enable camera access.NSPhotoLibraryUsageDescription) entry (if not already present) to enable photo library access.The Persona Inquiry verification flow is initiated with an InquiryConfiguration. This configuration can be initialized with either a templateId or an inquiryId.
Please refer to the code sample below and replace my_template_id with your template ID. You can find your template ID on the Persona Dashboard’s Integration Section.
This starts the Inquiry flow and takes control of the user interface. Once the flow completes the control of the user interface is returned to the app and the appropriate delegate method will be called.
The results of the inquiry are passed back to the InquiryDelegate, and are as follows
inquirySuccess — the inquiry passedinquiryFailed — the inquiry failedinquiryCancelled — the inquiry was cancelled by the userinquiryError — the inquiry erroredSome different configuration examples can be found below:
Make the Persona Inquiry flow look and feel like your app.
You can customize visual attributes of the Persona flow by setting the desired attributes on a Theme object and passing it to InquiryConfiguration (shown in the last configuration example in the code block above).
Customizable attributes include colors, fonts, text alignments, images, and animations. A list of customizable theme attributes can be found here:https://sdk.withpersona.com/ios/docs/Structs/InquiryTheme.html
In order to specify fonts on iOS, the fonts must be either system fonts or fonts bundled into your application. For a list of system fonts available out of the box, view: https://developer.apple.com/fonts/system-fonts/
If you would like to provide your own custom font, add a font file to the Xcode project by following the guide here: https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app.
Then, you can specify your custom font in the Theme object:
You can replace any title, body, or button text by providing your own strings file called Persona.strings in your app bundle. At runtime, the SDK will use any of the strings found there.
For example: