DocumentationAPI Reference
DocumentationAPI Reference

Migrate from iOS SDK v1 to v2

iOS SDK v2 brings support for Dynamic Flow Templates, which represent the next generation of Persona's inquiryinquiry - A single instance of an individual attempting to verify their identity. flow. Dynamic Flow Templates allow for greater flexibility in data collection by allowing custom UIs and collection fields.

Dynamic Flow Templates support versioning and fully custom, component-based views. If you are an existing customer and are interested in using Dynamic Flow Templates, please contact us or talk to your CSM.

Am I using Dynamic Flow Templates?

If your template ID starts with tmpl_, then you are using the old Template and should use the iOS SDK v1 Integration Guide.

If your template ID starts with itmpl_, then you are using the new Dynamic Flow Template and must use iOS SDK v2 Integration Guide.

I am an existing customer using iOS SDK v1. Do I need to migrate?

You must use iOS SDK v2 if you are using Dynamic Flow Templates. Inquiries created via Dynamic Flow Templates will not work properly with iOS SDK v1.

Existing users who are not using Dynamic Flow Templates will not need to migrate to iOS SDK v2, and iOS SDK v1 will continue working for the immediate future. However, we encourage using the latest version whenever possible to take advantage of improvements and bug fixes.

If you have a hard reliance on removed features, but want or need to use Dynamic Flow Templates, please contact us or talk to your CSM for a migration path.

What do I need to do to migrate to iOS SDK v2 API?

The following lists breaking changes in the 2.x version of our SDK.

Inquiry SDK latestInquiry SDK latest

Updated InquiryDelegate

Before

extension MyViewController: InquiryDelegate {

    func inquirySuccess(inquiryId: String, attributes: Attributes, relationships: Relationships) {
        // Inquiry succeeded
    }

    func inquiryCancelled() {
        // Inquiry cancelled by user
    }

    func inquiryFailed(inquiryId: String, attributes: Attributes, relationships: Relationships) {
        // Inquiry failed
    }

    func inquiryError(_ error: Error) {
        // Inquiry errored
    }
}

After

extension MyViewController: InquiryDelegate {

    func inquiryComplete(inquiryId: String, status: String, fields: [String : InquiryField]) {
        // Inquiry completed
    }
    
    func inquiryCanceled(inquiryId: String?, sessionToken: String?) {
        // Inquiry canceled by user
    }
    
    func inquiryError(_ error: Error) {
        // Inquiry errored
    }
}

Full list of breaking changes

Change

Replacement

InquiryDelegate.inquirySuccess(_, _, _) and InquiryDelegate.inquiryFailed(_, _, _) removed

InquiryDelegate.inquiryComplete(_, _, _) returned for both passes and fails with a new status argument; check for failure with status == 'failed'.

InquiryDelegate.inquiryCancelled() renamed

InquiryDelegate.inquiryCanceled(_, _)

InquiryConfiguration.accessToken renamed

InquiryConfiguration.sessionToken

Relationships and Attributes removed

These response objects were used to support use cases Dynamic Flow supports more robustly. Please contact us about your use case if you were using the fields. InquiryField has replaced these structs.

What's new in iOS SDK v2 API?

Change

Purpose

InquiryConfiguration now includes TemplateVersion based initializers.

Allows locking inquiry creation to a specific template version. Only Dynamic Flow Templates have versions. This is designed to enabled better development experience and support for incrementally rolling out changes.

InquiryDelegate.inquiryCanceled(_, _) callback now includes an inquiryId and a sessionToken.

Allows for resuming the Inquiry flow without needing to make a server call. See the InquiryConfiguration inquiryId initializers.

InquiryDelegate.inquiryComplete callback includes a map of field names to InquiryField.

Enable custom data returned to the client. Contact us for your use case.

View an example migration from SDK v1.1.18 to v2.0.1

Click here to view an example migration in our public demo app.