Step 1: Drag and drop the PresenceSDK.framework and iOSExperienceSDK.framework into your project’s General -> Embedded Binaries settings (copy items if needed)
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.
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.
If you have provided correct configuration you will see a similar screen at startup when you run the application:
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.
Step 3. Go to your app module build gradle file and set the name of each aar file as compile dependencies as follows:
Step 4. Add the following dependencies in the same place as step #3:
After adding them, the build gradle dependencies will look similar to the one shown as below:
Step 5. Create a configurePresenceSDK() method inside your activity class. In this method, the account credentials and branding color will be configured.
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.
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
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.
Step 8. Call the configurePresenceSDK(), launchPresenceSDK() and configureExperienceSDK() methods in the activity class onCreate() method.
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.
Step 9. Define the “AppTheme” style in styles.xml as follows:
Step 10. Add tools:replace for theme and label in application level as follow:
Step 11: Try to build and compile. At this point, it should be compiled without errors.