Certain values have been renamed (since we have unified PSDK objects into PSDK namespace)
This means if you previously used any of these objects (2.5.0 or earlier), you will now see compiler errors
It should only take you 5-10 minutes to update these names. Follow this simple migration guide.
Important 2.2.0 notice:
Clear Text Removal: TM will be removing the clear text callbacks from the PSDK for account ID and email address and migrating fully to the token based callback system (You must make a separate request for the member id/email) using the access token. By using tokens that can only be decoded by approved partners, data security will be enhanced. Additionally, with the full migration to Modern Accounts, the token will be providing both the Archtics and HOST Account Information and so clients will be able to fully identify those users in their database.
example, maskedteam member id
“teamname.17804314.1852513” will as of PSDK 2.2.0 return as “**.17804314.**”
If you need to fetch additional member information such as email or additional member identifiers using the oAuthToken (token) use the following Archtics API call
Important PSDK 2.1.0 notice:
Experience SDK is now deprecated. Please remove any Experience SDK integrations in place in your app if using PSDK v2.1.0 or greater.
Important PSDK 2.0.0 notice:
A.) Presence SDK 2.0.0+ now requires 2 additional frameworks (bringing the total frameworks to 4):
All these files can be found in the Presence SDK distribution zip file.
B. If you are also integrating the Purchase SDK, you will need to use the latest version available here
C. If you are using the latest versions of Xcode 12.3+ you may see an error when compiling: Building for iOS Simulator, but the linked and embedded framework was built for iOS + iOS Simulator.
This is a known issue with non-XCFramework files (ie. “fat frameworks”) that we will soon fix. In the meantime, you can simply convert this error to a warning:
In your Project’s Build Settings, set “Validate Workspace” to “Yes”
Obtaining the Presence SDK Framework Files
We currently offer two different ways to install the Presence SDK into a project. You can either use CocoaPods or manually load the framework files.
To integrate PresenceSDK into your Xcode project using CocoaPods, specify it in your Podfile :
To integrate Presence SDK in your application, you will need the latest release of the Presence SDK for iOS.
Requirements for using Swift build
To build, you must use Xcode 12.0+ and the iOS 12+ SDK
Requirements for using Swift 5.8.0 build
To build, you must use Xcode 12.0+ and the iOS 12+ SDK
Only Portrait Orientation Supported.
iPhone support only.
Minimum iOS 12.0, supported through iOS 15.x
Offline Ticket Mode, which allows fans to access their tickets without a network connection, also requires that the app be accessible offline.
Beta versions of Xcode and swift are not supported.
Importing The SDK
Follow these simple steps to integrate and configure the SDK.
Note: If using CocoaPods, you can skip step 1.
Step 1: Drag and drop the PresenceSDK.framework, iOSExperienceSDK.framework, and Presence.framework into your project’s General -> Embedded Binaries settings (copy items if needed) (Skip step if using Cocoapods)
Step 2: Go to your app’s AppDelegate file and import the PresenceSDK module. You may delete the line where UIKit is being imported if you like. In the PresenceSDK module, UIKit is already being imported for you.
Step 3: Create a configurePresenceSDK() method inside your AppDelegate class. In this method, the account credentials and branding color will be configured.
Note: To get consumer key please create an account on https://developer.ticketmaster.com and register your app and it will generate a consumer key that can be used in the above method. Before you can use Presence SDK you will have to provide the generated consumer key together with consumer secret and redirect URI to Presence SDK support team so we can configure your app on our end!
Step 4: Call the configurePresenceSDK() method in the application(: didFinishLaunchWithOptions:) function.
Setting Up the Views
Now that we’ve imported the SDK into your project we can set up the views to display the UI.
In your storyboard, create a UIViewController or you may use the preset one provided by XCode when a new project is created. This UIViewController will be the starting point for Presence SDK.
Step 1: Drag and drop a UIView from the Object Library (located in the Utility panel) inside this UIViewController. For this UIView, in the Identity Inspector, change the class to PresenceSDKView and Module to PresenceSDK. Finally, set the constraints to the UIView to the edges of the View Controller.
Step 2: You will need to allow the user to logout in some fashion. We recommend using a UIBarButtonItem on the top right corner of the Navigation Item (see example below), but this is not required. You just need to reference the PresenceSDK.getPresenceSDK().logOut() method wherever you want to call the log out function. Please note that the .logout() call will log out both Host and Archtics accounts. Please see the Logout Methods section below under iOS Presence SDK Reference Guide lower on this screen for more information on logout functionality.
Example Logout Functionality: Like the UIView from step 1, drag and drop a UIBarButtonItem onto the Navigation Item of the View Controller. If the View Controller doesn’t have a Navigation item, you may drag and drop from the Object Library before adding a UIBarButtonItem. Double click the UIBarButtonItem’s title and type in “Logout”.
You may now run the application and if you have provided correct configuration, you will see a similar screen to the image below at startup.
IMPORTANT: If your project is in Objective-C, you will get a run time fatal error:
dyld: Library not loaded: @rpath/libswiftContacts.dylib
Referenced from: */Frameworks/PresenceSDK.framework/PresenceSDK
Reason: image not found. To fix this error, in your project build settings, set YES for Always Embed Swift Standard Libraries under Build Options.
NOTE: Further setup required. You still need to configure your application to handle PresenceSDK events.
Configuring Your ViewController
Note: This is a basic example for configuring the ViewController
Step 3: Import the PresenceSDK module. Again, UIKit is imported automatically when importing PresenceSDK, so if you like, you may delete the import UIKit code-line.
Step 4: Create an IBOutlet to the UIView you setup in step 1. When the outlet is created, please make sure the view is of type PresenceSDKView. Make sure that you connect this new outlet to the PresenceSDKView in the storyboard. If you used our example logout, remember to also, create an IBAction method called logout for the UIBarButtonItem you setup in step 2. In the method logout, call the logOut method in the PresenceSDK.
Step 5: Conform your ViewController to PresenceLoginDelegate and implement the required and optional protocol methods:
Step 6: Start PresenceSDK inside viewDidLoad() life cycle method.
We’ve also added the ability to start the login flow for specific backend environments. Please see the example below:
Step 7: If you need to get information for logged in member, you can use one the protocol methods.
Your ViewController’s implementation should look like this:
You have finish integrating PresenceSDK. Now, you may run the application, if everything was configured properly, you should see your tickets once you log in.
iOS Presence SDK Reference Guide
Jump to Order / Jump to Event
We have revamped our Jump to Order and Jump to Event logic.
If event is found for given id, the method opens the list of tickets related to the found event.
If order is found for given id, the method opens the list of tickets related to the found order.
Configure Brand Logo
Configure your brand logo with a UIImage object. This image will show up in the linking screen replacing the brand abbreviation.
If you do not set a brand logo, then the abbreviation will work like before. Ex: TicketMaster becomes TM.
Specifying a Branding Color
Configure your branding color with a UIColor object
Configure Team Theme
Configure your team’s theme as SDKTheme.Light (default) or SDKTheme.Dark. The theme configuration lets PresenceSDK
know how to setup various UI elements to contrast with branding color. For example, if branding
color is in the dark color spectrum, a Light theme configuration will color various UI elements white.
This will allow crucial UI element to be visible to the user.
Configure Login Item
Because Account Manager’s website only supports Forgot Password OR Create account, we have updated the SDK to do the same to remove confusion for your users. by default if not specified, you will see Forgot Password.
Suppress View After Login
Presence SDK gives the ability to allow the user to login, then immediately dismiss the presenceSDKView. All that you need to do is utilize the following PresenceLoginDelegate method which you implemented in step 5:
Once the user has successfully logged in, you can then dismiss or hide the presenceSDKView for later viewing at your leisure.
Note: onLoginSuccessful gets called for each account that is logged in. So in the instance of having a team and host account logged in, the onLoginSuccessful delegate method will be fired off twice.
Following methods are provided for logging out of the Presence SDK. Logout is now asynchronous so
it is recommended to use the completion handlers or PresenceLoginDelegate methods for notification
about logout completion.
A simple Logout handler function can look like this:
Note: Please note that a fan’s tickets will no longer be available on the device for offline viewing if logout is called, as it will clear the cache.
Check Login Status
Presence SDK also provides some helper methods for checking if user is logged into any of the supported services.
Venue Concession Integration
Presence SDK can now present a Venue Concessions upsell module right inside the Tickets page.
Simply implement the two PresenceVenueDelegate methods:
Presence SDK provides support for tracking user activity via its Analytics module.
For tracking user activity in the Presence SDK a separate class PresenceEventAnalytics is provided that lists all the user actions that are notified via local notifications together with the payload data.
Notifications - You can observe these notifications to receive updates from Presence SDK.
Payload Data for the Notifications – Only relevant information is sent out with the notification.
If you want to track ACTION_MANAGETICKETSCREENSHOWED event you should add an observer inside your ViewController’s viewDidLoad() method like this:
And the notification handler will look something like this:
Following section describes the steps you need to follow to prepare your app for the App Store.
PresenceSDK is packaged as a Universal binary and it contains binary packages for all valid architectures including ARMv* and x86. This is great for development as you can run your app on both devices and simulators but for App Store submission you need to strip the simulator packages from your App. To do this we have provided “strip_frameworks.sh” file, just add this file to the Run Script phase under your app’s Build Phases settings and it will do the work for you. Here is a screenshot of what your Build phases will look like after adding this file: