Giter Club home page Giter Club logo

mixpanel-iphone's Introduction

Build Status Average time to resolve an issue Percentage of issues still open CocoaPods Version Carthage compatible Apache License

Want to Contribute?

The Mixpanel library for iOS is an open source project, and we'd love to see your contributions! We'd also love for you to come and work with us! Check out http://boards.greenhouse.io/mixpanel/jobs/25226#.U_4JXEhORKU for details.

If you are using Swift, we recommend our Swift Library (currently supports the tracking and people API).

Installation

CocoaPods

Mixpanel supports CocoaPods for easy installation. To Install, see our full documentation »

iOS:

pod 'Mixpanel'

tvOS:

pod 'Mixpanel/tvOS'

watchOS:

pod 'Mixpanel'

App Extension:

pod 'Mixpanel-AppExtension'

Carthage

Mixpanel also supports Carthage to package your dependencies as a framework. Check out the Carthage docs » for more info.

To integrate Mixpanel into your Xcode project using Carthage, specify it in your Cartfile:

github "mixpanel/mixpanel-iphone"

Run carthage update to build the framework and drag the built Mixpanel.framework into your Xcode project.

Manual Installation

To help users stay up to date with the latests version of our iOS SDK, we always recommend integrating our SDK via CocoaPods, which simplifies version updates and dependency management. However, there are cases where users can't use CocoaPods. Not to worry, just follow these manual installation steps and you'll be all set.

Step 1: Add as a Submodule

Add Mixpanel as a submodule to your local git repo like so:

git submodule add [email protected]:mixpanel/mixpanel-iphone.git

Now the Mixpanel project and its files should be in your project folder!

Step 2: Add the SDK to your app!

Add the "Mixpanel" folder from the "mixpanel-iphone" to your Xcode project's folder:

alt text

And drag and drop the Mixpanel folder into your Xcode Project Workspace:

alt text

Step 3: Import All dependencies

Add all dependencies of the Mixpanel SDK to your app. The full list of necessary frameworks and libraries on lines 16-17 in the "Mixpanel.podspec" file in the "mixpanel-iphone" directory:

alt text

Step 4: Integrate!

Import "Mixpanel.h" into AppDelegate.m, and initialize Mixpanel within application:didFinishLaunchingWithOptions:

alt text

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [Mixpanel sharedInstanceWithToken:MIXPANEL_TOKEN];
}

Start tracking

You're done! You've successfully integrated the Mixpanel SDK into your app. To stay up to speed on important SDK releases and updates watch our iPhone repository on Github.

Have any questions? Reach out to [email protected] to speak to someone smart, quickly.

mixpanel-iphone's People

Contributors

samgreen avatar neilrahilly avatar malectro avatar yarneo avatar orj avatar alex-hofsteede avatar elfredpagan avatar kasrak avatar zyskowsk avatar coeur avatar jaredmixpanel avatar patedit avatar yas375 avatar simx avatar mt-rpranata avatar ttrefren avatar idpaterson avatar dblock avatar idstar avatar lickel avatar carlsverre avatar evnp avatar shortstuffsushi avatar adamwulf avatar ericcj avatar joeatwork avatar weibel avatar readmecritic avatar joeymalysz avatar justinmakaila avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.