> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.withpersona.com/2020-05-18/migrate-from-ios-sdk-v2-to-v3/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server. # Migrate from iOS SDK v2 to v3 > Migrate an iOS integration from SDK v2 to v3 and adopt its updated APIs. iOS SDK v3 cleans up a few long-deprecated APIs, raises the minimum supported iOS version, and adds SwiftUI support. The inquiry flow hasn't changed, so your existing Dashboard templates and Inquiry IDs continue to work. This guide walks through what you need to change in your app to move from v2 to v3. Most integrators only need to update a handful of call sites. ## At a glance | Change | What to do | | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Minimum iOS deployment target raised from 13.0 to 15.0 | Bump your app's minimum deployment target to 15.0, or use the latest [v2.x release](https://github.com/persona-id/inquiry-ios-2/releases) of the SDK. | | CocoaPods is no longer published | Migrate your install path to Swift Package Manager or the manual XCFramework. See [Installation](/ios-sdk-v2-integration-guide#installation). | | `InquiryConfiguration` initializers and the `Inquiry(config:delegate:)` initializer are removed | Construct inquiries with the builder API: `Inquiry.from(templateId:delegate:)`, `Inquiry.from(inquiryId:delegate:)`, `Inquiry.from(templateVersion:delegate:)`, or `Inquiry.from(oneTimeLinkCode:delegate:)`, then chain configuration setters and call `.build()`. | | `InquiryDelegate.inquiryError(_:)` now takes `PersonaError` instead of `Error` | Update your delegate method signature. Switch on `PersonaError` cases to react to specific failures. | | Client-side theming removed (`Inquiry.theme`, `InquiryTheme`, `theme` parameter on `InquiryConfiguration`) | Move client-side styles into your dashboard theme using the [Theme Editor](https://help.withpersona.com/articles/6SIHupp847yaEuVMucKAff/tutorial-configure-a-theme-with-flow-editor/). To customize the initial loading screen, use [`initialLoadingView`](/ios-sdk-v2-integration-guide#initial-loading-screen). | | Async upload APIs removed (`Inquiry.doAsyncUpload`, `retrieveUnprocessedFilesForAsyncUpload`, `AsyncUploadDelegate`, `asyncUploadDelegate` builder parameter) | Remove any references to these from your integration. | | `routingCountry(_:)` builder method removed | Remove any call to `.routingCountry(_:)` from your inquiry construction. | ## Migration details ### Minimum iOS deployment target is now 15.0 v3 raises the minimum deployment target from iOS 13.0 to iOS 15.0. If your app needs to support iOS 13–14, stay on the latest [v2.x release](https://github.com/persona-id/inquiry-ios-2/releases). ### CocoaPods is no longer published v3 ships only via Swift Package Manager and the manual XCFramework. The `PersonaInquirySDK2` CocoaPods spec is not updated past v2. If you must keep using CocoaPods, stay on v2. Otherwise, migrate your install path to SPM. See the [iOS Integration Guide](/ios-sdk-v2-integration-guide#installation). ### `InquiryConfiguration` is no longer public The `InquiryConfiguration` struct and its `Inquiry(config:delegate:)` initializer have been removed from the public surface. Construct inquiries with the builder API instead. #### Before ```swift let config = InquiryConfiguration( templateId: "itmpl_EXAMPLE", referenceId: "myUser_123", environment: .sandbox ) let inquiry = Inquiry(config: config, delegate: self) inquiry.start(from: self) ``` #### After ```swift let inquiry = Inquiry.from(templateId: "itmpl_EXAMPLE", delegate: self) .referenceId("myUser_123") .environment(.sandbox) .build() inquiry.start(from: self) ``` The builder exposes all of the configuration that `InquiryConfiguration` did. See [Configuration](/ios-sdk-v2-integration-guide#configuration) in the integration guide for the full list. ### `InquiryDelegate.inquiryError` now receives a typed `PersonaError` The signature changed from `func inquiryError(_ error: Error)` to `func inquiryError(_ error: PersonaError)`. `PersonaError` is an enum describing what went wrong, with cases such as `.networking`, `.misconfigured`, `.camera`, and `.permissions`. #### Before ```swift func inquiryError(_ error: Error) { print(error.localizedDescription) } ``` #### After ```swift func inquiryError(_ error: PersonaError) { switch error { case .networking: // Show a retry prompt case .misconfigured: // Log a template-configuration error during development default: // Surface a generic error } } ``` See [Handle Errors](/ios-sdk-v2-integration-guide#handle-errors) for a complete example. ### Client-side theming is removed Theming is now fully server-driven through the [Theme Editor in the Persona Dashboard](https://help.withpersona.com/articles/6SIHupp847yaEuVMucKAff/tutorial-configure-a-theme-with-flow-editor/). The in-code `Inquiry.theme` API, `InquiryTheme` struct, and the `theme` parameter on `InquiryConfiguration` are no longer available. Move any client-side colors, fonts, or styles you previously set in Swift into your dashboard theme. The [Migrate iOS Theming from Client to Server](/migrating-ios-theming-from-client-to-server) guide walks through the mapping. The one exception is the initial loading screen, the view shown after the inquiry is launched and before the first server response arrives. You can replace it with your own SwiftUI view via the new [`initialLoadingView`](/ios-sdk-v2-integration-guide#initial-loading-screen) builder method. ### Async upload APIs are removed The experimental async upload surface has been removed. This includes `Inquiry.doAsyncUpload(...)`, `Inquiry.retrieveUnprocessedFilesForAsyncUpload()`, the `AsyncUploadDelegate` protocol, and the `asyncUploadDelegate` builder parameter. There is no direct replacement; if your integration relied on these APIs, please [contact us](https://app.withpersona.com/dashboard/contact-us) to discuss alternatives before upgrading. ### `routingCountry` builder method removed The `routingCountry(_:)` builder method has been removed. Routing is handled automatically by Persona. Remove any call to `.routingCountry(_:)` from your inquiry construction. > Migrate an iOS integration from SDK v2 to v3 and adopt its updated APIs.