-
Install CocoaPods
$> sudo gem install cocoapods
-
Create a
Podfile
in your app product directory:target 'MyAppTargetHere' do use_frameworks! end
-
Add RCAnalytics as a dependency
target 'MyAppTargetHere' do use_frameworks! pod "RCAnalytics", "~> 0.2.0" end
-
Install Dependencies
$> pod install
-
Add RCAnalytics to Your Cartfile:
github "cinema6/RCAnalytics" ~> 0.2.0
-
Download and Build RCAnalytics:
$> carthage update RCAnalytics
-
Manually Add the Generated Framework (
Carthage/Build/iOS/RCAnalytics.framework
) to your target viaGeneral => Embedded Binaries
.
-
Get your product ID from the Reelcontent Showcase platform
-
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
Reelcontent, Inc., info@reelcontent.com
RCAnalytics is available under the MIT license. See the LICENSE file for more info.