CocoaPods
Just add pod pod 'TopMindSDK'
into your Podfile.
Then run pod install
add
<key>TopMindClientId</key>
<string>your_client_id</string>
<key>TopMindApiKey</key>
<string>your_api_key</string>
to info.plist
/**
* Use it to send event to TopMind.
* @param name - event's name: "Button pressed" e.g
* @param eventData - NSDictionary with properties @{ @"myParam": @"myValue" } e.g
*/
- (void)logEvent:(NSString*) name withEventProperties:(NSDictionary*) eventData;
/**
* Use it to persist user identifier
* It will be passed through all events as userId value
* @param userId - your user id
*/
- (void)setUserId:(NSString*) userId;
/**
* It removes all persisted TopMind data (userId e.g)
*/
- (void)logout;
/**
* Sends event that app has started
*/
- (void)applicationStarted;
/**
* Returns the current install id. The id is generated by the app at first run
* App persists the id through the whole app lifetime.
*
* Will be deleted if you clear the application data
*/
- (NSString *)getInstallId;
/**
* Returns the current sid_long. The id is generated and returned by TopMind at first event response
* App persist the id through the whole app lifetime and passes it through each event
*
* Will be deleted if you clear the application data
*/
- (NSString *)getSidLong;
/**
* Returns true if the application was launched for the first time
*/
- (BOOL)isFirstRun;