Objective-C without Scenes
If your application is written in Objective-C and does not use Scenes, having an AppDelegate file, follow these steps:
Open the AppDelegate.m file and add the
#import <PulseLabsFlightRecorderSDK/PulseLabsFlightRecorderSDK-Swift.h>
statement to the top of the file:AppDelegate.mInsert
[FlightRecorderSDK startWithApiKey:@"YOUR_API_KEY" automaticallyShowIntroduction:FALSE];
into theapplication:didFinishLaunchingWithOptions
method as shown below, replacing the text"YOUR_API_KEY"
with your own API key. There is also one optional parameter called "surveyName" that takes in a string. If you have designed an in-app survey on the portal, then supply the unique survey name string here, and it will show that instead of the default formAppDelegate.mAdd the
applicationDidBecomeActive:
delegate method if it doesn't already exist, and then insert the code to safely call theshowIntroductionUIWithDisplayOnlyOnce:true error:
method as shown below. This will show the Introduction Screen on the first time application launch:AppDelegate.mNote: The error handling is present in case you accidentally run the
showIntroductionUIWithDisplayOnlyOnce:error:
before thestartWithApiKey:automaticallyShowIntroduction
method. If you do this, the introduction screen will not appear but you will have an error in your logs.
The SDK is now installed! You can shake or take a screenshot on a real device (the SDK will not work in a simulator) to capture the video content and send a report.
If you have any issues, head to the Troubleshooting section.
Last updated