Adding Manually

This section outlines how to manually integrate the Hurree SDK into your application code.

The Hurree SDK is available in both Swift3 and Swift4 versions.

To clone / download the Hurree SDK

First, take a copy of the SDK version you require from the Hurree Git repository. You can do this from the command line with the following commands:

Swift 3:

$ git clone https://github.com/hurreedotco/Hurree_iOSSDK_Swift3.git

Swift 4:

$ git clone https://github.com/hurreedotco/Hurree_iOSSDK_Swift4.git

Now that you have a copy of the SDK locally, you can integrate it with your existing app.

  1. Open your existing app in Xcode.
  2. From the Project Navigator, select the destination project or group for the Hurree SDK.
  3. Right click and select Add Files to <YourProject>

Add Files

  1. Add Files
  2. Add Files
  3. Add Files
  4. Locate the folder where you checked out the Hurree iOS SDK, select the HurreeSDK.framework and click Add.
  5. From the navigation panel, click on the target for your project, and select the Build Phases tab.
  6. From the Embed Frameworks menu, add the HurreeSDK.framework.

The first stage of integrating the Hurree iOS SDK is now complete - you will now need to add other dependencies manually. You need to add each of the following frameworks to your project and mark them as Required.

  • SystemConfiguration.framework
  • QuartzCore.framework
  • libz.tbd
  • CoreImage.framework
  • CoreText.framework
  • CoreLocation.framework
  • UserNotifications.framework

To add required frameworks to your project

  1. Open your project with XCode.
  2. From the navigation panel, click on the target for your project, and select the Build Phases tab.
  3. From the Linked Binary with Libraries menu, select all the libraries listed above and add ensuring they are marked as Required.

You should now be able to import and use methods from the Hurree SDK. You can verify this by incorporating an import statement into one of your files:

import HurreeSDK

If all is well, the library will be found and you can avail of it's methods, as outlined in the Methods and Arguments section.

e.g.

let analytics = AnalyticsSingleton.sharedInstance()

analytics.deportKeyValues(
    YOUR_APP_GROUP_KEY,
    app_group_key: YOUR_APP_KEY,
    uniqueUserID: UserId.text! as AnyObject ,
    deviceTokenString: deviceToken as AnyObject,
    timerValue: Constants.TIMER_VALUE_SECONDS as AnyObject
)

If you need more guidance, you can refer to the iOS sample application which provides a complete integration overview of how use the included framework.

results matching ""

    No results matching ""