- Print
- DarkLight
Summary
The old Ticketmaster Presence SDK framework has been replaced by two new frameworks:
Tickets: Post-Purchase functionality such as viewing purchased Events, Tickets, and Barcodes
Authentication: Authentication functionality such as Login, Logout, Refresh Tokens, and Member Info
Below is a list of class and method name mapping between the old Presence 1.X or 2.X and the new Authentication 1.X and Tickets 3.X.
Properties
Presence framework | Tickets/Authentication frameworks |
---|---|
PSDK.shared | TMTickets.shared |
PSDK.shared.version | TMTickets.shared.version |
PSDK.shared.orderDelegate | TMTickets.shared.orderDelegate |
PSDK.shared.moduleDelegate | TMTickets.shared.moduleDelegate |
PSDK.shared.loginDelegate | TMAuthentication.shared.delegate |
PresenceEventAnalytics notifications | TMTickets.shared.analyticsDelegate |
Configuration
For a source code example, see Example Tasks: Configuration
Presence framework | Tickets/Authentication frameworks |
---|---|
PSDK.shared.setConfig(consumerKey: ...) | TMAuthentication.shared.configure(apiKey: ...) and TMTickets.shared.configure(success:failure) |
PSDK.shared.checkConfig(success:failure:) | not needed anymore, as success/error blocks are now part of: TMTickets.shared.configure(success:failure) |
PSDK.shared.start(presenceView:) | TMTickets.shared.start(ticketsView:) |
Authentication
Note that all Authentication related methods have been moved to TMAuthentication.shared.
For a source code example, see Example Tasks: Authentication
Presence framework | Authentication framework |
---|---|
PSDK.shared.loginDelegate | TMAuthentication.shared.delegate |
PSDK.shared.login(...) | TMAuthentication.shared.login(...) |
PSDK.shared.hostLoginQueryParams | TMAuthentication.shared.login(backend: .HostModernAccounts, loginProperties: ...) |
PSDK.shared.archticsLoginQueryParams | TMAuthentication.shared.login(backend: .TeamModernAccounts, loginProperties: ...) |
PSDK.shared.sportXRLoginQueryParams | TMAuthentication.shared.login(backend: .SportXR, loginProperties: ...) |
PSDK.shared.isLoggedIn() | TMAuthentication.shared.hasUnexpiredToken() |
PSDK.shared.isLoggedIntoHost() | TMAuthentication.shared.hasUnexpiredToken(backend: .HostModernAccounts) |
PSDK.shared.isLoggedIntoTeam() | TMAuthentication.shared.hasUnexpiredToken(backend: .TeamModernAccounts) |
PSDK.shared.isLoggedIntoSportXR() | TMAuthentication.shared.hasUnexpiredToken(backend: .SportXR) |
PSDK.shared.hasUserSignedIn() | TMAuthentication.shared.hasToken() |
PSDK.shared.hasUserSignedInHost() | TMAuthentication.shared.hasToken(backend: .HostModernAccounts) |
PSDK.shared.hasUserSignedInTeam() | TMAuthentication.shared.hasToken(backend: .TeamModernAccounts) |
PSDK.shared.hasUserSignedInSportXR() | TMAuthentication.shared.hasToken(backend: .SportXR) |
PSDK.shared.getAccessToken(...) | TMAuthentication.shared.validToken(...) |
PSDK.shared.getMemberInfo(...) | TMAuthentication.shared.memberInfo(...) |
PSDK.shared.startMFAValidation(...) | TMAuthentication.shared.validateMFAToken(...) |
PSDK.shared.logout(...) | TMAuthentication.shared.logout(backend: nil, ...) |
PSDK.shared.logOutHost(...) | TMAuthentication.shared.logout(backend: .HostModernAccounts, ...) |
PSDK.shared.logOutTeam(...) | TMAuthentication.shared.logout(backend: .TeamModernAccounts, ...) |
PSDK.shared.logOutSportXR(...) | TMAuthentication.shared.logout(backend: .SportXR, ...) |
PresenceOAuthProvider | TMAuthenticationProvider |
Operations
Presence framework | Tickets framework |
---|---|
PSDK.shared.jumpToOrderOrEvent(id:type:action:) | TMTickets.shared.display(orderOrEventId:type:action:) |
PSDK.shared.setTicketsActionButton(title: "foo") | TMTickets.shared.ticketsNavBarButtonText = "foo" |
PSDK.shared.getTicketsActionBarButtonText() | let text = TMTickets.shared.ticketsNavBarButtonText |
PSDK.shared.setUserTracking(enabled: false) | TMTickets.shared.userTrackingEnabled = false |
Branding
By default Tickets inherits basic branding from Authentication via TMAuthentication.Branding passed into TMAuthentication.shared.configure(brandedServiceSettings:success:failure).
So the following methods are optional unless you need to customize Tickets branding beyond the basic branding provided by Authentication.
Presence framework | Tickets framework |
---|---|
PSDK.shared.setBrandingColors(...) | TMTickets.shared.brandingColorsOverride = TMTickets.BrandingColors() |
PSDK.shared.enableTMBrandingColorOverride() | TMTickets.shared.brandingColorButtonOverride = true |
PSDK.shared.doNotBrandNavBar() | TMTickets.shared.brandingColorNavBarOverride = true |
PSDK.shared.setLogo(...) | TMTickets.shared.brandingTeamLogoImage = UIImage() |
PSDK.shared.setTheme(theme:) | theme is now part of TMAuthentication.Branding and TMTickets.BrandingColors |
Custom Modules
Presence framework | Tickets framework |
---|---|
PSDK.shared.moduleDelegate | TMTickets.shared.moduleDelegate |
PresenceModuleDelegate | TMTicketsModuleDelegate |
- addCustomModules(eventOrders:completion:) | - addCustomModules(event:completion:) |
- handleModuleActionButton(moduleIdentifier:buttonTitle: callbackValue:eventOrders:completion:) | - handleModuleActionButton(event:module:button: completion:) |
- userDidPressActionButton(moduleIdentifier:buttonTitle: callbackValue:eventOrders:) | TMTicketsAnalyticsDelegate.userDidPerform(action: .moduleActionButton, metadata:) |
PSDKTicketsModule | TMTicketsModule |
PresenceModuleHeaderView | TMTicketsModuleHeaderView |
PSDKTicketsModule.accountManagerSeatUpgrades(...) | TMTicketsPrebuiltModule. accountManagerSeatUpgrades(...) |
PSDKTicketsModule.accountManagerMoreTicketActions(...) | TMTicketsPrebuiltModule. accountManagerMoreTicketActions(...) |
PSDKTicketsModule.venueDirectionsViaAppleMaps(...) | TMTicketsPrebuiltModule. venueDirectionsViaAppleMaps(...) |
PSDKTicketsModule.venueConcessions(...) | TMTicketsPrebuiltModule.venueConcessions(...) |
Order Delegate
All User-behavior analytics have been moved to TMTicketsAnalyticsDelegate.
The remaining methods in TMTicketsOrderDelegate represent either:
- non-analytics: actions that require your application to do something, such as handleNavBarButtonAction
- analytics that are not based on User-behavior: such as didUpdateEvents
Presence framework | Tickets framework |
---|---|
PSDK.shared.orderDelegate | TMTickets.shared.orderDelegate |
PresenceOrderDelegate | TMTicketsOrderDelegate |
- presentEventDetailsPage(...) | no longer used |
- presentArtistDetailsPage(...) | no longer used |
- presentVenueDetailsPage(...) | no longer used |
- presentClientAppPage(...) | - presentClientAppPage(...) |
- handleBarButtonAction(page: screenTitleName:eventOrders:) and handleBarButtonAction(page: buttonTitle:eventOrders:) | - handleNavBarButtonAction(page: screenTitleName:event:) |
- didUpdateEvents(eventOrderArray:) and didUpdateOrderedEvents() | - didUpdateEvents(events:fromCache:) |
- didUpdateTickets(eventOrders:) and didUpdateTickets(eventId:) | - didUpdateTickets(event:fromCache) |
- didPresentEventList() | TMTicketsAnalyticsDelegate.userDidView(page: .events, metadata:) |
- didPresentTicketList() | TMTicketsAnalyticsDelegate.userDidView(page: .eventTickets, metadata:) |
Analytics Delegate
Old notification-based PresenceEventAnalytics have been replaced with a simplier TMTicketsAnalyticsDelegate.
Presence framework | Tickets framework |
---|---|
PresenceEventAnalytics notifications | TMTickets.shared.analyticsDelegate |
PresenceEventAnalytics | TMTicketsAnalyticsDelegate |
- userDidView(page:metadata:) | |
- userDidPerform(action:metadata:) |
Login Delegate
Note that all Authentication related methods have been moved to TMAuthentication.shared.
The same Authentication-related information is available via:
- TMAuthentication.shared.delegate
- TMAuthentication.shared**.registerStateChanged**(block:)
- TMAuthentication.AuthNotification
For the purposes of comparison to the old Presence framework, the TMAuthenticationDelegate methods are listed below:
Presence framework | Authentication framework |
---|---|
PSDK.shared.loginDelegate | TMAuthentication.shared.delegate |
PresenceLoginDelegate | TMAuthenticationDelegate |
- onLoginWindowDidDisplay(...) | - onStateChanged(backend:state: .loginPresented, error:) |
- onLoginForgotPasswordClicked(...) | no longer used |
- onLoginMethodUsed(...) | - onStateChanged(backend: backend, state: .loggedIn, error:) |
- onLoginSuccessful(...) | - onStateChanged(backend:state: .loginCompleted, error:) |
- onLoginCancelled(...) | - onStateChanged(backend:state: .loginAborted, error:) |
- onLoginFailed(...) | - onStateChanged(backend:state: .loginFailed, error:) |
- onTokenRefreshed(...) | - onStateChanged(backend:state: .tokenRefreshed, error:) |
- onRefreshTokenFailed(...) | no longer used, see: TMTickets.shared.validToken(... failure: ...) |
- onRefreshTokenExpired(...) | no longer used, see: TMTickets.shared.validToken(...) |
- onLogoutSuccessful(...) | - onStateChanged(backend:state: .loggedOut, error:) |
- onLogoutFailed(...) | no longer used, as logout can no longer fail |
- onLogoutAllSuccessful() | - onStateChanged(backend:state: .logoutCompleted, error:) |
- onMemberUpdated(...) | no longer used, see: TMTickets.shared.memberInfo(...) |
- onCacheCleared() | TMTicketsOrderDelegate.didClearEventsTicketsCache(...) |
Other Class Name Changes
Presence framework | Tickets/Authentication frameworks |
---|---|
PSDK | TMTickets |
PSDK.HostEnvironment | TMAuthentication.TMXDeploymentRegion |
PSDK.SDKEnvironment | TMAuthentication.TMXDeploymentEnvironment |
PSDK.BackendName | TMAuthentication.BackendService |
PSDK.BrandingColors | TMTickets.BrandingColors or TMAuthentication.Branding |
PSDK.SDKTheme | TMAuthentication.ColorTheme |
PSDK.errorDomain | TMTickets.TicketsError.domain |
PresenceViewController | TMTicketsViewController |
PresenceView | TMTicketsView |
Data Models
Presence framework | Tickets framework |
---|---|
PresenceMember | TMMemberInfo |
PresenceEventOrders | TMPurchasedEvent |
PresenceEvent | TMPurchasedEventInfo |
PresenceOrder | TMPurchasedOrder |
PresenceTicket | TMPurchasedTicket |