{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Migration to v3.x","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"migration-to-v3x","__idx":0},"children":["Migration to v3.x"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide helps you migrate your iOS Fraud Prevention integration to version 3.x."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Version 3.x includes breaking changes that will cause runtime errors if not addressed. Review all changes before upgrading."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whats-new","__idx":1},"children":["What's new"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Breaking changes"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setUserId()"]}," is renamed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setAuthenticatedUser()"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," is now a mandatory parameter in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimUserId"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSActionEventOptions"]}," is deprecated. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserId"]}," instead."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New features"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserIdType"]}," parameters in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSActionEventOptions"]}," for typed user identification."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"migrate-your-integration-to-v3x","__idx":2},"children":["Migrate your integration to v3.x"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-update-sdk-dependency","__idx":3},"children":["Step 1: Update SDK dependency"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update your Swift Package Manager dependency to the latest major version:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"dependencies: [\n    .package(url: \"https://github.com/TransmitSecurity/accountprotection-ios-sdk.git\", .upToNextMajor(from: \"2.0.0\"))\n]\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"dependencies: [\n    .package(url: \"https://github.com/TransmitSecurity/accountprotection-ios-sdk.git\", .upToNextMajor(from: \"3.0.0\"))\n]\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-add-baseurl-to-initialization","__idx":4},"children":["Step 2: Add baseUrl to initialization"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you initialize the SDK with explicit parameters using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," is now a required parameter. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," value must include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/risk-collect/"]}," path."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.initialize(clientId: \"[CLIENT_ID]\")\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.initialize(baseUrl: \"https://api.transmitsecurity.io/risk-collect/\", clientId: \"[CLIENT_ID]\")\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you initialize using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initializeSDK()"]}," with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransmitSecurity.plist"]}," file, make sure the plist includes a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-rename-setuserid-to-setauthenticateduser","__idx":5},"children":["Step 3: Rename setUserId to setAuthenticatedUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setUserId()"]}," method has been renamed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setAuthenticatedUser()"]},". Update all occurrences in your code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.setUserId(\"[USER_ID]\")\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.setAuthenticatedUser(\"[USER_ID]\")\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-4-update-triggeraction-options","__idx":6},"children":["Step 4: Update triggerAction options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimUserId"]}," parameter in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSActionEventOptions"]}," is deprecated. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserIdType"]}," instead."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"let options = TSActionEventOptions(correlationId: \"CORRELATION_ID\",\n                                  claimUserId: \"CLAIM_USER_ID\",\n                                  referenceUserId: \"REFERENCE_USER_ID\",\n                                  transactionData: nil)\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"let options = TSActionEventOptions(correlationId: \"CORRELATION_ID\",\n                                  claimedUserId: \"91e25bea0c...\", // hashed identifier\n                                  claimedUserIdType: .email,\n                                  referenceUserId: \"REFERENCE_USER_ID\",\n                                  transactionData: nil)\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-5-test-your-integration","__idx":7},"children":["Step 5: Test your integration"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify all SDK functionality works as expected."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check for any runtime errors related to renamed methods."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggerAction()"]}," returns action tokens as expected with the new parameter structure."]}]}]},"headings":[{"value":"Migration to v3.x","id":"migration-to-v3x","depth":1},{"value":"What's new","id":"whats-new","depth":2},{"value":"Migrate your integration to v3.x","id":"migrate-your-integration-to-v3x","depth":2},{"value":"Step 1: Update SDK dependency","id":"step-1-update-sdk-dependency","depth":3},{"value":"Step 2: Add baseUrl to initialization","id":"step-2-add-baseurl-to-initialization","depth":3},{"value":"Step 3: Rename setUserId to setAuthenticatedUser","id":"step-3-rename-setuserid-to-setauthenticateduser","depth":3},{"value":"Step 4: Update triggerAction options","id":"step-4-update-triggeraction-options","depth":3},{"value":"Step 5: Test your integration","id":"step-5-test-your-integration","depth":3}],"frontmatter":{"title":"Migration to v3.x","markdown":{"toc":{"depth":2}},"seo":{"title":"Migration to v3.x"}},"lastModified":"2026-04-19T15:03:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/mobile/ios/drs_migration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}