Heap 9.1.0

Heap 9.1.0

TestsTested
LangLanguage Obj-CObjective C
License Unknown
ReleasedLast Release Nov 2022

Maintained by John Clover, Jerry Jones, Andrew Yousef, Brian Nickel, Bryan Mitchell.



Heap 9.1.0

Heap for iOS

Heap is a modern take on analytics. There's no need to ship event tracking code, no need to wait days or weeks for data to accumulate, no need to muddle your codebase, and no need to fumble with rigid reports.

For the first time, meaningful product questions can be answered just as soon as they're asked.

See CHANGELOG.md for what's new.

Installation

We recommend using Cocoapods to quickly and easily add Heap:

  1. Install Cocoapods by running sudo gem install cocoapods.
  2. Create a file in your Xcode project directory called Podfile.
  3. Add the following line to your Podfile:
   pod 'Heap'
  1. Run pod install within your Xcode project directory.
  2. Initialize Heap with your app ID. We recommend doing this in applicationDidFinishLaunching: or application:didFinishLaunchingWithOptions: in your Application delegate as follows:
   #import "Heap.h"

   - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
       [Heap initialize:@"YOUR_APP_ID"];
   #ifdef DEBUG
       [Heap enableVisualizer];
   #endif

       /* Other launch code goes here */

       return YES;
   }
  1. Make sure you open the file with the extension .xcworkspace

Or you can install Heap manually:

  1. Download the Heap iOS library.
  2. Unzip the downloaded file and drag libHeap.a and Heap.h into your XCode project. Make sure to select Copy items if needed.
  3. Click on the project (blue project icon), and select "Build Settings".
  4. Within Build Settings, change "Other Linker Flags" to include -all_load -ObjC as a flag.
  5. Link your app to these libraries: * CFNetwork.framework * Foundation.framework * libicucore.tbd * Security.framework * SystemConfiguration * UIKit
  6. Initialize Heap with your app ID, as illustrated in the code snippet above.

Using Heap with Swift

The Heap library should work fine if you use an Objective-C bridge header with your Swift project.

  func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
      // Override point for customization after application launch.

      Heap.initialize("YOUR_APP_ID");
      #if DEBUG
          Heap.enableVisualizer();
      #endif

      return true
  }

Using Heap with iMessage Apps

Heap should work with standalone iMessage apps if you override didBecomeActive.

  func didBecomeActive(with conversation: MSConversation) {

      Heap.initialize("YOUR_APP_ID");
      #if DEBUG
          Heap.enableVisualizer();
      #endif
  }

Having trouble with iOS installation? Here are solutions for common problems.