Skip to content

Latest commit

 

History

History
106 lines (79 loc) · 2.72 KB

README.md

File metadata and controls

106 lines (79 loc) · 2.72 KB

RCAnalytics

Version License Platform Carthage compatible

Installation

Either With Cocoapods

Set Up Your App for Use With Cocoapods

  1. Install CocoaPods

    $> sudo gem install cocoapods
  2. Create a Podfile in your app product directory:

    target 'MyAppTargetHere' do
        use_frameworks!
    end

Install RCAnalytics

  1. Add RCAnalytics as a dependency

    target 'MyAppTargetHere' do
        use_frameworks!
        
        pod "RCAnalytics", "~> 0.2.0"
    end
  2. Install Dependencies

    $> pod install

OR With Carthage

  1. Add RCAnalytics to Your Cartfile:

    github "cinema6/RCAnalytics" ~> 0.2.0
    
  2. Download and Build RCAnalytics:

    $> carthage update RCAnalytics
  3. Manually Add the Generated Framework (Carthage/Build/iOS/RCAnalytics.framework) to your target via General => Embedded Binaries.

Usage

  1. Get your product ID from the Reelcontent Showcase platform

  2. Initialize RCAnalytics when your app launches:

    In Swift:

    import UIKit;
    import RCAnalytics;
    
    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {
        // called after your app launches
        func application(
            application: UIApplication,
            didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?
        ) -> Bool {
            RCAnalytics.create("your-product-id-here").launch(); // Launch RCAnalytics
            return true;
        }
    }

    In Objective-C:

    #import "AppDelegate.h"
    #import <Foundation/Foundation.h>
    @import RCAnalytics;
    
    @implementation AppDelegate
        // called after your app launches
        -(BOOL)
            application:(UIApplication *)application
            didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        {
            [[RCAnalytics create:@"your-product-id-here"] launch]; // Launch RCAnalytics
            return YES;
        }
    @end

Author

Reelcontent, Inc., info@reelcontent.com

License

RCAnalytics is available under the MIT license. See the LICENSE file for more info.