Presence SDK

The Ticketmaster Presence SDK provides a simple way to add Ticketmaster features in your 3rd party iOS and Android apps

What You Need

To integrate the Presence SDK in your application, you will need PresenceSDK.framework

Release Notes Version 1.3.1

To integrate the Presence SDK in your application, you will need PresenceSDK.framework and iOSExperienceSDK.framework.

Requirements for using Swift 4 build

  • To build, you must use XCode 9.0 and the iOS 11.0 SDK
  • Minimum iOS 9.0, supported through iOS 11

Requirements for using Swift 3.1 build

  • To build, you must use XCode 8.3.3 and the iOS 10.3 SDK
  • Minimum iOS 9.0, supported through iOS 10.3.3

What’s New?

  • Experience SDK Integration.
  • Improved Login Screen for the SDK.
  • Support for iPhone X screen size.
  • Added refresh button for fans with no tickets
  • Added support for honoring custom tint color for navigation bar configured via UIAppearance.
  • Bug fixes for adding Mastercard as refund card and other UI issues.

To integrate Presence sdk in your application, you will need the following aar file:

  • PresenceSDK-release-1.3...aar

Supported API levels

  • API level 16 ~ 25

Release Notes Version 1.3.1

Requirements

  • Supported API level 16 ~ 25

What’s New?

  • Experience sdk integration
  • Android wallet support
  • Main login entry screen change
  • Fixed potential resource naming collision issue with client projects. All presence sdk resources are named with “presence_sdk_” prefix.
  • Bug fixes for master card and branding coloring support for action bar

Importing the SDK

Follow these simple steps to integrate and configure the SDK.

Step 1: Drag and drop the PresenceSDK.framework and iOSExperienceSDK.framework into your project’s General -> Embedded Binaries settings (copy items if needed)

PresenceSDK iOS Step 1

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.

import PresenceSDK  //Import this module

Step 3: Create a configurePresenceSDK() method inside your AppDelegate class. In this method, the account credentials and branding color will be configured.

//Swift Version
func configurePresenceSDK() {
  //If you are a team use the following method to configure Presence SDK
  PresenceSDK.getPresenceSDK().setConfig(consumerKey: #consumer_key provided on dev portal,
    displayName: #your_team_display_name,
    useNewAccountsManager: #true/false for choosing between new or old account manager, by default it will choose old accounts manager)
  
  //If you are not a team and just going to login in Ticketmaster account than use the following method to configure Presence SDK
  PresenceSDK.getPresenceSDK().setConfig(consumerKey: #consumer_key provided on dev portal)

  //Configure your branding color for the SDK
  PresenceSDK.getPresenceSDK().setBrandingColor(color: UIColor(hex6: 0x3B6AA0))
}

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.

func application(_ application: UIApplication,
  didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  // Override point for customization after application launch.
  configurePresenceSDK()
  return true
}

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 5: Drag and drop a UIView from the Object Library in the Utility panel inside this UIViewController. For this UIView, change the class to PresenceSDKView and Module as PresenceSDK. Before moving on make sure you set the constraints for this UIView.

PresenceSDK iOS Step 5

If you have provided correct configuration you will see a similar screen at startup when you run the application:

PresenceSDK iOS Step 5 result

Step 1. Drop Presence sdk file in your application project libs folder

Step 2. Import it through “File -> New -> New Module -> Import .JAR / .AAR package”. Specify and locate the Presence sdk aar file.

PresenceSDK Android Step 1

PresenceSDK Android Step 2

Step 3. Go to your app module build gradle file and set the name of each aar file as compile dependencies as follows:

compile project(:PresenceSDK-release-1.3.1.0)

Step 4. Add the following dependencies in the same place as step #3:

compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.romandanylyk:pageindicatorview:0.0.5'
compile 'com.google.zxing:core:3.2.1'
compile 'com.android.support:percent:25.3.1'

After adding them, the build gradle dependencies will look similar to the one shown as below:

PresenceSDK Android Step 4

Step 5. Create a configurePresenceSDK() method inside your activity class. In this method, the account credentials and branding color will be configured.

private void configurePresenceSDK() {
  PresenceSDK.getPresenceSDK(getApplicationContext()).setConfig(consumerKey /*Consumer key provided on dev portal*/, 
    displayName /*your team display name */, 
    useNewAccountManager /*true/false for choosing between new or old account manager, by default it will choose old accounts manager */);

  // Configure your branding color for the SDK
  //opaque red
  presenceSDK.getPresenceSDK(getApplicationContext()).setBrandingColor(
  Color.parseColor("#ffff0000")); 
}

NOTE:

  1. Be aware that you need to pass application context object (not activity context) to PresenceSDK.getPresenceSDK() method. If it is not an application context, the presence sdk might reject and throw a runtime exception with a message to bring it to developer’s attention.

  2. 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 6. Create launchPresenceSDK() method inside the same activity class. In this method, you will implement a login listener and start the presence sdk

private void launchPresenceSDK() {
  PresenceSDK.getPresenceSDK(getApplicationContext()).start(this,
    R.id.presenceSDK /*the id of the framelayout defined in 		activity layout where you want to load PreseneSDK UI fragment */
    , new TMLoginListener() {
        @Override
        public void onLoginSuccessful(TMLoginApi.BackendName 			backendName, String accessToken) {
          Log.i(TAG, "Inside onLoginSuccessful");
        }

        Override
        public void onLoginFailed(TMLoginApi.BackendName backendName, 			String errorMessage) {
          Log.i(TAG, "Inside onLoginFailed");
        }

        @Override
        public void onLoginCancelled(TMLoginApi.BackendName 			backendName) {
          Log.i(TAG, "Inside onLoginCancelled");
        }

        @Override
        public void onLoginMethodUsed(TMLoginApi.BackendName 			backendName, TMLoginApi.LoginMethod method) {
          Log.i(TAG, "Inside onLoginMethodUsed");
        }

        @Override
        public void onLoginForgotPasswordClicked(TMLoginApi.BackendName 			backendName) {
          Log.i(TAG, "Inside onLoginForgotPasswordClicked");
        }

        @Override
        public void onCacheCleared() {
          Log.i(TAG, "Inside onCacheCleared");
        }

        @Override
        public void onMemberUpdated(@Nullable TMLoginApi.MemberInfo 			member) {
          Log.i(TAG, "Inside onMemberUpdated");
        }
		  });
}

NOTE:

You need to have a hosting activity layout where you need to add a framelayout to hold Presence sdk entry fragment. So, you will need to use the correct id of the framelayout specified in PresenceSDK.start() method. See code comment above.

Step 7. Create configureExperienceSDK() method inside the same activity class. In this method, you will configure about experience sdk.

Here is the sample code about how to set experience sdk wrapper object and set it to presence sdk.

private void configureExperienceSDK() {
  // specify these parameters to integrate ExperienceSDK
  // and pass them into PresenceSDK
  // this will NOT crash if no ExperienceSDK lib provided
  // presenceSDK.start() will check the availability of ExperienceSDK lib
  ExperienceConfiguration wrapper = new ExperienceConfiguration.Builder()
    .setAppId(TmxConstants.Experience.EXPERIENCE_APP_ID)
    .setAppName(TmxConstants.Experience.EXPERIENCE_APP_NAME)
    .setApiKey(TmxConstants.Experience.EXPERIENCE_API_KEY)
    .setAppSource(TmxConstants.Experience.EXPERIENCE_APP_NAME)
    .setSubdomain(TmxConstants.Experience.EXPERIENCE_SUBDOMAIN)
    .setDevServers(false)
    .build();
	
    presenceSDK.setExperienceConfiguration(wrapper);
}

Step 8. Call the configurePresenceSDK(), launchPresenceSDK() and configureExperienceSDK() methods in the activity class onCreate() method.

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  // set layout where you want to load presence sdk login entry view
  setContentView(R.layout.activity_main); 
  // call configure presence sdk method
  configurePresenceSDK();
  // configure experience sdk
  configureExperienceSDK();
  // call launch presence sdk method
  launchPresenceSDK();
}

This will load the entry fragment (UI shown below) where a login screen will be prompted to users to choose Ticketmaster or Team Account to login.

PresenceSDK Android Step 7

Step 9. Define the “AppTheme” style in styles.xml as follows:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

Step 10. Add tools:replace for theme and label in application level as follow:

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="false"
android:theme="@style/AppTheme"
tools:replace="android:theme, android:label">

Step 11: Try to build and compile. At this point, it should be compiled without errors.

Setting up the views

Now that we’ve imported the SDK into your project we can set up the views to display the UI

Configuring Your ViewController

Note: This is a basic example for configuring the ViewController

Step 1: Import PresenceSDK. Again, UIKit is imported automatically by importing PresenceSDK so if you like, you may delete the import UIKit code-line.

import PresenceSDK

Step 2: Create an outlet to the UIView that is of type PresenceSDKView.

//Connect your PresenceSDKView here
@IBOutlet weak var presenceSDKView: PresenceSDKView? = nil

Step 3: Conform your ViewController to PresenceLoginDelegate and implement the three required protocol functions.

extension ViewController: PresenceLoginDelegate {
  ///- parameter succeeded: Returns `true` if the user granted app access/logged in.
  ///- parameter error: If available, an `NSError` object is returned. Defaults is `nil`.
  func onLoginWasSuccessful(_ succeeded:Bool, error:NSError?)

  ///User dismissed login window via the Cancel button
  func onLoginCanceled()
    
  ///Called when results are returned for a member info request after successful login
  ///- parameter member: PresenceMember object. PresenceMember object is `nil` if login 
  ///fails or an error is returned fetching member details.
  func onMemberWasUpdated(_ member: PresenceMember?)
}

Step 4: Start PresenceSDK inside viewDidLoad() life cycle method.

override func viewDidLoad() {
  super.viewDidLoad()        
  PresenceSDK.getPresenceSDK().start(presenceSDKView: presenceSDKView, loginDelegate: self)
}

Step 5: If you need to get information for logged in member, you can use one the protocol methods.

///Called when results are returned for a Member info request after login
///- parameter member: Member object. Member object is `nil` if login fails or an error is returned fetching member details.
func onMemberUpdated(_ member: PresenceMember?) {
  if let pMember = member {
    print("Member Email: \(pMember.emailAddress)")
    print("Team Member-Id: \(pMember.AccountManagerMemberID)")
    print("Host Member-Id: \(pMember.HostMemberID)")
  }        
}

Your ViewController’s implementation should look like this:

import PresenceSDK


class ViewController: UIViewController, PresenceLoginDelegate {

  @IBOutlet weak var presenceSDKView: PresenceSDKView?
  var presenceSDK: PresenceSDK?

  override func viewDidLoad() {
    super.viewDidLoad()
    self.navigationItem.title = NSLocalizedString("My Events", comment: "")
    presenceSDK = PresenceSDK.getPresenceSDK()
    presenceSDK.start(presenceSDKView: presenceSDKView, loginDelegate: self)

  }
 
  override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
  }

  override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
  }

  @IBAction func logout(sender: UIButton) {
    presenceSDK.logOut()
  }


  func onLoginSuccessful(_ succeeded:Bool, error:NSError?) {
  }

  //User dismissed login window via the Cancel button
  func onLoginCancelled() {
  }

  ///Called when results are returned for a Member info request after login
  ///- parameter member: Member object. Member object is `nil` if login fails or an error is returned fetching member details.
  func onMemberUpdated(_ member: PresenceMember?) {
    if let pMember = member {
      print("Member Email: \(pMember.emailAddress)")
      print("Team Member-Id: \(pMember.AccountManagerMemberID)")
      print("Host Member-Id: \(pMember.HostMemberID)")
    }
  }
}

This is all you need to integrate the Presence SDK. Now you can run the application and Login into your configured accounts.

Configure Experience SDK

Presence SDK is packaged with Experience SDK and you have to embed both the frameworks to use Presence SDK. If you don’t want to use Experience SDK in your client app than please skip this step but if your client app also wants to provide Experience SDK features than you will also need to configure it. To configure Experience SDK please use this convenient method:

func configureExperienceSDK() {
  let experienceConfiguration = ExperienceConfiguration.Builder.init()
    .setAppId("yourAppId")
    .setAppSource("yourAppSource")
    .setSubdomain("subdomainForYourApp")
    .setAppName("yourAppName")
    .setApiKey("yourApiKey")
    .setApiSubdomain("apiSubdomainForYourApp")
    .build()
  PresenceSDK.getPresenceSDK().setExperienceConfiguration(experienceConfiguration)
}

You can call this method from didFinishLaunchingWithOptions() method of AppDelegate class.

Configuring Your Layout View

Specify a layout view in your desired layout file, for now this layout should fill the whole screen The ID for this layout will be referenced in the next step

<android.support.constraint.ConstraintLayout
  android:id="@+id/presenceSDKView"
  android:layout_width="0dp"
  android:layout_height="0dp"
  android:layout_marginBottom="0dp"
  android:layout_marginEnd="0dp"
  android:layout_marginStart="0dp"
  android:layout_marginTop="0dp"
  app:layout_constraintBottom_toBottomOf="parent"
  app:layout_constraintEnd_toEndOf="parent"
  app:layout_constraintStart_toStartOf="parent"
  app:layout_constraintTop_toTopOf="parent"/>

Specifying a branding color

Now that the SDK is initalized you can add some flair by specifying your team color to change the look of the SDK throughout

Configure your branding color with a UIColor object

presenceSDK.setBrandingColor(color: UIColor.blue)

Presence sdk clients can set their own branding theme color by defining this color value in their application resource “colors.xml” file:

<color name="presence_sdk_color_branding">#FFAA81</color>

The defined color will be displayed on all action buttons, action bars and ticket details page. If the above color variable is not defined in the client’s apk project, Tmx sdk will use a default color.

Also, there is a way to change the color at run time.

presenceSDK.getPresenceSDK(this).setBrandingColor(Color.parseColor("#ffff0000")); 

The defined color will be displayed on all action buttons, action bars and ticket details page. If the above color variable is not defined in the client’s apk project, Tmx sdk will use a default color.

Logout Methods

You’ve got logging in all set up, now you can set up logging out

Following methods are provided for logout

//To logout from both Host and Archtics
PresenceSDK.getPresenceSDK().logOut()

//To logout from Ticketmaster Account 
PresenceSDK.getPresenceSDK().logOutHost()

//To logout from Account Manager
PresenceSDK.getPresenceSDK().logOutTeam()

A simple Logout handler function can look like this:

@IBAction func logout(sender: UIButton) {
  PresenceSDK.getPresenceSDK().logOut()
}

Check Login Status

Presence SDK also provides some helper methods for checking if user is logged into any of the supported services.

// Method to check if user is logged in any of the services i.e Host or Accounts Manager.
PresenceSDK.getPresenceSDK().isLoggedIn()

// Method to check if user is logged in Host.
PresenceSDK.getPresenceSDK().isLoggedIntoHost()

// Method to check if user is logged in Accounts Manager.
PresenceSDK.getPresenceSDK().isLoggedIntoTeam()

You can implement log out functionality on your UI with by calling these API :

// TM logout
PresenceSDK.getPresenceSDK(context).logOutHost();
// Team logout 
PresenceSDK.getPresenceSDK(context).logOutTeam();
// logout both
PresenceSDK.getPresenceSDK(context).logOut();

Check Login Status

Presence SDK also provides some helper methods for checking if user is logged into any of the supported services.

// Method to check if user is logged in any of the service  i.e Host or Accounts 	Manger
PresenceSDK.getPresenceSDK(context).isLoggedIn();
// Method to check if user is logged in Host
PresenceSDK.getPresenceSDK(context).isLoggedIntoHost();
// Method to check if user is logged in Accounts Manager
PresenceSDK.getPresenceSDK(context).isLoggedIntoTeam();

Analytics

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.

@objcMembers final public class Action : NSObject {

  /////////////////////////////////////////////////////////////////////////////////////////
  // Notified when all user events are displayed
  // The payload will be nil.
  public static let ACTION_MYTICKETSCREENSHOWED: String

  // Notified when user selects a specific event to via tickets
  // The payload will contain all the mandatory data.
  public static let ACTION_MANAGETICKETSCREENSHOWED: String

  // Notified when user visits the Add Payment Method screen
  // The payload will contain all the mandatory data.
  public static let ACTION_ADDPAYMENTINFOSCREENSHOWED: String

  // Notified when user visits the Barcode screen
  // The payload will contain all the mandatory data.
  public static let ACTION_MYTICKETBARCODESCREENSHOWED: String

  // Notified when user visits the Tickets Detail screen
  // The payload will contain all the mandatory data.
  public static let ACTION_TICKETDETAILSSCREENSHOWED: String

  
  // Transactional Actions
  /////////////////////////////////////////////////////////////////////////////////////////

  // Notified when user tries to Initiate Ticket Transfer
  // The payload will contain all the mandatory data and will also contain
  // INITIATE_TRANSFER_TICKET_COUNT and INITIATE_TRANSFER_TICKET_FACEVALUE
  public static let ACTION_TRANSFERINITIATED: String

  // Notified when user Cancels a Ticket Transfer
  // The payload will contain all the mandatory data and will also contain
  // CANCEL_TRANSFER_ID
  public static let ACTION_TRANSFERCANCELLED: String

  // Notified when user Post a ticket for Resale
  // The payload will contain all the mandatory data and will also contain
  // INITIATE_RESALE_TICKET_COUNT and INITIATE_RESALE_PRICE
  // Payload will also contain RESALE_BUYER_FEES, RESALE_SELLER_FEES,
  // RESALE_SELLER_PAYOUT and RESALE_ORIGINAL_FACE_VALUE
  public static let ACTION_RESALEINITIATED: String

  // Notified when user Cancels a posted ticket for Resale
  // The payload will contain all the mandatory data and will also contain
  // CANCEL_RESALE_POSTING_ID
  public static let ACTION_RESALECANCELLED: String

  // Notified when user Edit a Posted ticket for Resale
  // The payload will contain all the mandatory data and will also contain
  // UPDATE_RESALE_POSTING_ID and UPDATE_RESALE_PRICE

  // Payload will also contain RESALE_BUYER_FEES, RESALE_SELLER_FEES,
  // RESALE_SELLER_PAYOUT and RESALE_ORIGINAL_FACE_VALUE
  public static let ACTION_RESALEEDITED: String
}

Payload Data for the Notifications – Only relevant information is sent out with the notification.

@objcMembers final public class Data : NSObject {

  // Mandatory Payload Data with all the Notifications
  public static let EVENT_ID: String

  public static let EVENT_NAME: String

  public static let EVENT_DATE: String

  public static let EVENT_IMAGE_URL: String

  public static let VENUE_NAME: String

  public static let VENUE_ID: String

  public static let CURRENT_TICKET_COUNT: String

  public static let ARTIST_NAME: String

  public static let ARTIST_ID: String


  // Notification Specific Payload Data
  public static let INITIATE_TRANSFER_TICKET_COUNT: String

  public static let INITIATE_TRANSFER_TICKET_FACEVALUE: String

  public static let CANCEL_TRANSFER_ID: String

  public static let CANCEL_TRANSFER_ORDER_ID: String

  public static let INITIATE_RESALE_TICKET_COUNT: String

  public static let INITIATE_RESALE_PRICE: String

  public static let UPDATE_RESALE_POSTING_ID: String

  public static let UPDATE_RESALE_PRICE: String

  public static let RESALE_BUYER_FEES: String

  public static let RESALE_ORIGINAL_FACE_VALUE: String

  public static let RESALE_SELLER_PAYOUT: String

  public static let RESALE_SELLER_FEES: String

  public static let CANCEL_RESALE_POSTING_ID: String
}

Analytics Usage

If you want to track ACTION_MANAGETICKETSCREENSHOWED event you should add an observer inside your ViewController’s viewDidLoad() method like this:

override func viewDidLoad() {
  super.viewDidLoad()

  NotificationCenter.default.addObserver(self, selector: #selector(self.ticketsScreenShown),
    name: NSNotification.Name(rawValue:PresenceEventAnalytics.Action.ACTION_MANAGETICKETSCREENSHOWED),
    object: nil)
}

And the notification handler will look something like this:

@objc func ticketsScreenShown(_ notification: Notification) {
  let eventId = notification.userInfo?[PresenceEventAnalytics.Data.EVENT_ID] ?? ""
  let eventName = notification.userInfo?[PresenceEventAnalytics.Data.EVENT_NAME] ?? ""
  print("Event_Id: \(eventId), Event_Name: \(eventName)")
}

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 broadcast manager notifications together with the payload data.

Notification Events – You can observe these notifications to receive udpates from Presence SDK.

public static final class Action {

  /////////////////////////////////////////////////////////////////////////////////////////
  // UI events (Start)
  /////////////////////////////////////////////////////////////////////////////////////////
  public static final String ACTION_MYTICKETSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.MYTICKETSCREENSHOWED";
  public static final String ACTION_MANAGETICKETSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.MANAGETICKETSCREENSHOWED";
  public static final String ACTION_ADDPAYMENTINFOSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.ADDPAYMENTINFOSCREENSHOWED";
  public static final String ACTION_REVIEWPOSTINGSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.REVIEWPOSTINGSCREENSHOWED";
  public static final String ACTION_POSTINGCONFIRMATIONSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.POSTINGCONFIRMATIONSCREENSHOWED";
  public static final String ACTION_CANCELPOSTINGSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.CANCELPOSTINGSCREENSHOWED";
  public static final String ACTION_CANCELPOSTINGCONFIRMSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.CANCELPOSTINGCONFIRMSCREENSHOWED";
  public static final String ACTION_MYTICKETBARCODESCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.MYTICKETBARCODESCREENSHOWED";
  public static final String ACTION_TICKETDETAILSSCREENSHOWED = "com.ticketmaster.presencesdk.eventanalytic.action.TICKETDETAILSSCREENSHOWED";
  public static final String ACTION_TICKETSTUBIMAGESHARED = "com.ticketmaster.presencesdk.eventanalytic.action.TICKETSTUBIMAGESHARED";

  /////////////////////////////////////////////////////////////////////////////////////////
  // UI events (End)
  /////////////////////////////////////////////////////////////////////////////////////////

  /////////////////////////////////////////////////////////////////////////////////////////
  // Business operation events (Start)
  /////////////////////////////////////////////////////////////////////////////////////////
  public static final String ACTION_TRANSFERINITIATED = "com.ticketmaster.presencesdk.eventanalytic.action.TRANSFERINITIATED";
  public static final String ACTION_TRANSFERCANCELLED = "com.ticketmaster.presencesdk.eventanalytic.action.TRANSFERCANCELLED";
  public static final String ACTION_TRANSFERACCEPTED = "com.ticketmaster.presencesdk.eventanalytic.action.TRANSFERACCEPTED";
  public static final String ACTION_RESALEINITIATED = "com.ticketmaster.presencesdk.eventanalytic.action.RESALEINITIATED";
  public static final String ACTION_RESALECANCELLED = "com.ticketmaster.presencesdk.eventanalytic.action.RESALECANCELLED";
  public static final String ACTION_RESALEUPDATED = "com.ticketmaster.presencesdk.eventanalytic.action.RESALEEDITED";
  /////////////////////////////////////////////////////////////////////////////////////////
  // Business operation events (End)
  /////////////////////////////////////////////////////////////////////////////////////////
}

Payload Data for the Notifications – Only relevant information is sent out with the notification.

public static final class Data {

  // general data for event details, and ticket details
  public static final String EVENT_ID = "event_id";
  public static final String EVENT_NAME = "event_name";
  public static final String EVENT_DATE = "event_date";
  public static final String EVENT_IMAGE_URL = "event_image_url";
  public static final String EVENT_ORDER_ID = "event_order_id";
  public static final String VENUE_NAME = "venue_name";
  public static final String VENUE_ID = "venu_id";
  public static final String CURRENT_TICKET_COUNT = "current_ticket_count";
  public static final String EVENT_ARTIST_NAME = "artist_name";
  public static final String EVENT_ARTIST_ID = "artist_id";

  // data for transfer initiate event
  public static final String INITIATE_TRANSFER_TICKET_COUNT = "initiate_transfer_ticket_count";
  public static final String INITIATE_TRANSFER_TICKET_FACEVALUE = "initiate_transfer_ticket_facevalue";
  public static final String INITIATE_TRANSFER_TICKET_SERIALIZABLE = "initiate_transfer_ticket_serializable";

  // data for transfer cancel event
  public static final String CANCEL_TRANSFER_ID = "cancel_transfer_id";
  public static final String CANCEL_TRANSFER_ORDER_ID = "cancel_transfer_order_id";


  // data for resale initiate event
  public static final String INITIATE_RESALE_TICKET_COUNT = "initiate_resale_ticket_count";
  public static final String INITIATE_RESALE_PRICE = "initiate_resale_price";
  public static final String INITIATE_RESALE_TICKET_SERIALIZABLE = "initiate_resale_ticket_serializable";

  // data for resale update event
  public static final String UPDATE_RESALE_PRICE = "update_resale_price";
  public static final String UPDATE_RESALE_POSTING_ID = "update_resale_posting_id";

  // data for resale initiate and update events
  public static final String RESALE_BUYER_FEES = "resale_buyer_fees";
  public static final String RESALE_ORIGINAL_FACE_VALUE = "resale_original_face_value";
  public static final String RESALE_SELLER_PAYOUT = "resale_seller_payout";
  public static final String RESALE_SELLER_FEES = "resale_seller_fees";

  // data for resale cancel event
  public static final String CANCEL_RESALE_POSTING_ID = "cancel_resale_posting_id";

  //data for sharing image
  public static final String SHARE_TICKET_IMAGE_DIR = "share_ticket_image_path";
  public static final String SHARE_TICKET_IMAGE_FILENAME = "share_ticket_image_filename";
  public static final String SHARE_TICKET_EVENT_ID = "share_ticket_event_id";
  public static final String SHARE_TICKET_EVENT_NAME = "share_ticket_event_name";
}

Analytics Usage

If you want to track ACTION_MANAGETICKETSCREENSHOWED event, you should register a local broadcast listener as below:

IntentFilter analyticEventFilter = new IntentFilter();
analyticEventFilter.addAction(PresenceEventAnalytics.Action.ACTION_MYTICKETSCREENSHOWED);
LocalBroadcastManager.getInstance(MainActivity.this).registerReceiver(mAnalyticEventReceiver, analyticEventFilter);

You can implement receiver mAnalyticsEventReceiver as follows:

private BroadcastReceiver mAnalyticEventReceiver = new BroadcastReceiver() {
  @Override
  public void onReceive(Context context, Intent intent) {

    if (PresenceEventAnalytics.Action.ACTION_MYTICKETSCREENSHOWED.equals(intent.getAction())) {
      Toast.makeText(MainActivity.this, "Analytic Event: My tickets screen showed.", Toast.LENGTH_LONG).show();
    }
  }
};

Release

Following section describes the steps you need to follow to prepare your app for Apple or Google 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:

PresenceSDK iOS Step 5 result

No additional actions required.

Change log

Changes (11/21/17 Release 1.3.1)

  • Fixed experience sdk integration issues.
  • Fixed crash while adding a credit card for Host.

Changes (11/6/17 Release 1.3.0)

  • Experience SDK Integration.
  • Improved Login Screen for the SDK.
  • Support for iPhone X screen size.
  • Added refresh button for fans with no tickets
  • Added support for honoring custom tint color for navigation bar configured via UIAppearance.
  • Bug fixes for adding Mastercard as refund card and other UI issues.

Changes (10/16/17 Release 1.2.0)

  • Added support for entering verification code for linking TMR account for Archtics.
  • Fixed seat description selection for posting flow for Archtics.
  • Separated the login flow from main SDK so it can just be used for login and fetching valid access token.

Changes (10/5/17 Release 1.1.1)

  • Added support for choosing between different payout methods during Resale flow for Archtics.

Changes (09/29/17 Release 1.1.0)

  • Added support for Apigee and made integration with SDK much simpler.
  • Added support for seat selection in Transfer and Resale flow.
  • Added support for pre-fetching Apple Wallet Passes
  • Added 3 new helper methods for checking login status
  • Fixed few minor issues in the SDK

Changes (09/15/17 Release 1.0.8)

  • Switched to XCode 9 and Swift 4.

Changes (09/13/17 Release 1.0.7)

  • Fixed couple of issues related to accepting terms of use if user has not accepted it yet.
  • Cancel Transfer option is immediately available after initiating a transfer.
  • Scan Barcode option is immediately available after canceling transfer if barcode is available.
  • Added a configuration parameter in the SDK to select new accounts manager flow for resetting password and creating account on main login screen.
  • Added SDK version number on the main login screen.

Changes (09/5/17 Release 1.0.6)

  • Fixed the issue related to not able to post multiple tickets for resale at the same time.
  • Removed ticket price information from the Ticket Details View since that information is not provided.
  • Fixed an issue related to ‘Cancel’ button not appearing on Login screen in some cases.
  • Fixed an issue related to automatic scrolling to ticket card which has been successfully posted for resale.
  • Fixed the appearance of login button on Events List View when the current logged in account does not have any tickets.

Changes (08/24/17 Release 1.0.5)

  • Updated the main login screen and added a button for user to create new account or reset password.
  • Fixed a bug related to SDK hanging during the login flow.

Changes (08/22/17 Release 1.0.4)

  • Added some safety checks to avoid some crashes during Login flow.
  • Handled case for events that don’t have date and have TBD or some date override text.

Changes (08/18/17 Release 1.0.3)

  • Fixed issue related to grouping of ticket card when multiple tickets are transferred together.
  • Fixed another issue related to missing tickets from Transfer Group Selection View.

Changes (08/17/17 Release 1.0.2)

  • Fixed issue related to missing tickets from Transfer Group Selection View.

Changes (08/11/17 Release 1.0.1)

  • Added support to Add to Apple Wallet for ticket passes.
  • Added support for html tags in Accept Terms of Use screen.
  • Fixed couple of bugs while Adding and Editing deposit account.
  • Fixed issue related to handling of “Session Expired” error.

Changes (11/21/2017 Release 1.3.1)

  • Fixed experience sdk integration issues.
  • Fixed experience button menu missing after second time the ticket view is visited.

Changes (11/06/2017 Release 1.3.0)

  • Experience sdk integration
  • Android wallet support
  • Main login entry screen change
  • Fixed potential resource naming collision issue with client projects. All presence sdk resources are named with “presence_sdk_” prefix.
  • Bug fixes for master card and branding coloring support for action bar

Changes (10/16/2017 Release 1.2.0)

  • Added support for entering verification code for linking TMR account for
  • Fixed seat description selection for posting flow for Archtics
  • Fixed intermittent logout issue
  • Separated the login flow from main SDK so it can just be used for login and fetching valid access token.
  • Fixed other in-field issues

Changes (10/05/2017 Release 1.1.1)

  • Added support for choosing between different payout methods during Resale flow for Archtics.

Changes (09/29/2017 Release 1.1.0)

  • Added support for Apigee and made integration with SDK much simpler.
  • Added support for seat selection in Transfer and Resale flow.
  • Added 3 new helper methods for checking login status
  • Fixed few minor issues in the SDK.

Changes (09/13/2017 Release 1.0.0)

  • Resolved login issue of getting stuck in log-in screen after logging in and clicking“authorize” button.
  • Resolved login issue of getting 401 status when clicking on an event
  • Handled session expiry error
  • Fixed crashlytics crashes
  • Fixed crash due to multiple loading of TmxMainView
  • Fixed missing seats at group selection view in transfer/resale flow
  • Fixed in-field crash/issues
  • Fixed edit resale operation with 4 digit price
  • Added forgot password on log-in UI (08/24/2017)
  • Fixed duplicate ticket card in listing pending state (09/05/2017)
  • Added price breakdown in ticket details (09/05/2017)
  • Supported upsell items (09/05/2017)
  • Fixed payment account delete operation failure in concurrent log-in scenario (09/05/2017)
  • Restored barcode immediately after resale/transfer cancel (09/12/2017)
  • Fix to automatically refresh the event list view once user logs in to second server (09/12/2017)
  • Bundle and unbundle multi tickets resale or transfer operations (09/12/2017)
  • Added support for password recovery for teams still on old account manager (09/13/2017)

SDK

Download Presence SDK iOS - Swift 4.

Download Presence SDK iOS - Swift 3.1.

Download Presence SDK Android.