--- title: "Migration" slug: "legacy-purchase-sdk-migration" updated: 2023-07-31T15:12:37Z published: 2023-07-31T15:12:37Z canonical: "ignite.ticketmaster.com/legacy-purchase-sdk-migration" --- > ## Documentation Index > Fetch the complete documentation index at: https://ignite.ticketmaster.com/llms.txt > Use this file to discover all available pages before exploring further. # Legacy Purchase SDK Migration ## Migrating from Legacy Purchase SDK to Retail SDK (iOS) If your app uses our legacy Purchase SDK offered through June 2023 to show Event Detail Page and purchase flow, this is how you can migrate the code base to use Retail SDK (part of Ignite) instead. While Purchase is now part of Retail, the actual interfaces did not change very much. ## Downloading the SDK Previously, Purchase SDK was downloaded as a zip file that contains three xcframeworks (TicketmasterDiscoveryAPI.xcframework, TicketmasterFoundation.xcframework, TicketmasterPurchase.xcframework). Now, the modules are downloaded using Swift Package Manager. The ones you need to add to your target are the same three (TicketmasterDiscoveryAPI, TicketmasterFoundation, TicketmasterPurchase) plus TicketmasterAuthentication. For more details on how to do this, see our article on [adding Ignite Swift package](/v1/docs/swift-package-manager). Remember to delete the old xcframework dependencies from your target, or you will get the duplicate symbols build error. Here's an example showing the duplicates. The blue ones (xcframeworks) need to be deleted. ![](https://cdn.document360.io/995f0bfa-740b-4247-b341-fde1e5326a96/Images/Documentation/Screenshot%202023-07-12%20at%205.26.28%20PM.png) ## Configuration If your app used the old Purchase SDK, you might have set it up like this: ```swift import TicketmasterPurchase TMPurchase.shared.apiKey = "" ``` To migrate to Purchase framework of Retail SDK, you don't need to do anything different in the setup portion, because this part remains the same! ## Showing Event Detail Page (and Subsequently Checkout) In the old Purchase SDK, you might have done it like this to bring up an [Events Detail Page (EDP)](/v1/docs/events-detail-page-edp) and the subsequent purchase flow: ```swift let eventId = "1C005E7FAF5D45BF" let config = TMPurchaseWebsiteConfiguration(eventID: eventId) let purchaseVC = TMPurchaseNavigationController(configuration: config) // If you used Purchase SDK in conjunction with PSDK, you might also have this line. purchaseVC.oauthDelegate = PSDK.shared.oauthProvider present(purchaseVC, animated: true) ``` In Ignite, you can keep things largely the same. We do have a new convenience function to create a `TMPurchaseNavigationController` without creating `TMPurchaseWebsiteConfiguration` but the old way is still available for more customized setup. Here's the new way: ```swift let eventId = "1C005E7FAF5D45BF" let purchaseVC = TMPurchaseNavigationController.eventDetailsNavigationController(eventIdentifier: eventId) present(purchaseVC, animated: true) ``` Also, you no longer need to set the `oauthDelegate` to handle login scenarios. However, you do need to set up `TMAuthentication` prior to using `TMPurchase`, because the user is required to log in in order to complete purchase. Below is a basic example of setting up `TMAuthentication`. That said, many of our clients of the legacy Purchase SDK also handle login using our legacy Presence SDK (PSDK). If you have already migrated from PSDK to the new Accounts SDK (part of Ignite) as described in our [Presence SDK Migration, iOS](/v1/docs/migration-1) guide, you already have this part covered. ```swift TMAuthentication.shared.configure(apiKey: "