Methods and Arguments

Actions and functionality within the Hurree dashboard and user notifications are controlled and require the appropriate use of the SDK methods. Each is listed below, along with the relevant arguments.

Each method requires its own successCallback and errorCallback function.

Method Functionality
deportKeyValues Logs device specific values
deportUserValues Logs user specific values
sendLoginDetails Send the device and user specific values to the platform.
logoutUser Logs all the logout events
changeUser Ensure successful logging and transfer of user details
logPurchaseWithCurrencyWithPriceAndQuantity Registering Purchase events
setCustomLogWithEventName Registering custom/bespoke events
pushNotificationWasSentFromHurree Determines if Hurree sent the push notification
shownotification Creates the notification view
sendCustomValues Allows the setting of additional contact properties

Depending on how you want the Hurree functionality to work, you can decide where each method is called, though we have made some suggestions below. If you need more guidance, you can refer to the iOS sample application which provides a complete suggested integration overview of how to use the included framework.


To enable the application to start the SDK, start the login process and receive notifications from the server - the following sequence of method calls is recommended and required on user login.

// ====================================================================================
// deportKeyValues
// Send the known User ID for the login - along with other values we can determine -
// e.g. your app & group keys and the device token generated in the AppDelegate. The 
// timer value here is how often you want your events sent back to the Platform. 
// The min is 30 secs - depending on your app and your needs, you can increase this.
// deportUserValues
// Method sends user-specific values to Hurree.
// We require that you call these methods together before the sendLoginDetails method. 
// Depending on your scenario  and the type of analysis you are interested in you may 
// want to consider the changeUser SDK method if you have user churn.
// You may want to consider calling these methods when your app is opened.
// This will allow you gather events on when your user is coming back to your app.
// ====================================================================================
    app_group_key: Constants.APP_KEY,
    uniqueUserID: editUserId.text! as AnyObject ,
    deviceTokenString: deviceToken as AnyObject,
    timerValue: Constants.TIMER_VALUE_SECONDS as AnyObject

    lastName: editSurname.text!,
    phoneNumber: editPhoneNumb.text!,
    email: editEmailAddr.text,
    userImageURL: "",
    gender: Constants.GENDER_MALE,
    dateOfBirth: editDOB.text

// ====================================================================================
// sendLoginDetails
// This method is used to log in to the HurreeSDK.
// ====================================================================================
analytics.sendLoginDetails{(result) in


results matching ""

    No results matching ""