PerformanteSDK is a tool for tracking different events in your application.
Objective-C bridging header
. If you don't how to do it, explanation is here.Add import to your class where you want to use SDK
Swift
import PerformanteSDK
Objective-C
#import <PerformanteSDK/PerformanteSDK.h> or @import PerformanteSDK;
Swift
let sdk = PFSDK.newWithProductId("Example-Swift", apiKey:"example-api-key")
sdk.sendAppStarted()
sdk.sendAppEvent("Custom_event")
Objective-C
PFSDK *sdk = [PFSDK newWithProductId:@"Example-Objective-C" apiKey:@"example-api-key"];
[sdk sendAppStarted];
[sdk sendAppEvent:@"Custom_event"];
Method sendAppStarted
should be called when app was started.
Method sendAppEvent:
is for sending different event.
When you don't want track existing user you can use method:
Swift
sdk.setExistingUser(true)
Objective-C
[sdk setExistingUser:YES];
Default value for this parameter is set to false/NO
. When you set to true/YES
user will not be tracked. Remember to configure this value before calling method sendAppStarted
.
If you want to make sure that you have correctly configured SDK you can enable debug mode. Add to your main plist file below code:
<key>PerformanteSDK</key>
<dict>
<key>EnableDebugMode</key>
<true/>
</dict>
You can setup true
or false
value for key EnableDebugMode
.
If you still have difficulty setting up the SDK, look at the Example applications in Swift and Objective-C.
The Apache License (Apache) - check included LICENSE file