The mixpanel-iphone repository is the official iOS tracking library for Mixpanel Analytics, written in Objective-C. It enables developers to integrate Mixpanel's event tracking and user engagement capabilities into iOS applications. The library is open source and actively maintained, with the project recommending that Swift developers use the separate mixpanel-swift library instead.
The library provides core analytics functionality including event tracking, user property management, and automatic collection of common mobile events. Developers can send custom events from anywhere in their application and attach event-specific properties to better understand user behavior. The library automatically collects default properties and can be configured to enable or disable automatic event collection through project settings. Events are batched and sent to Mixpanel servers every 60 seconds while the application is running, or when the app transitions to the background, though developers can manually trigger a flush at any time.
Installation is supported through multiple dependency management systems. CocoaPods users can add the Mixpanel pod to their Podfile, while Carthage users can include the dependency in their Cartfile. Swift Package Manager is also supported for versions 4.0.0 and above. Initialization requires importing the Mixpanel header and calling the sharedInstanceWithToken method with a project token obtained from Mixpanel's project settings.
The repository includes comprehensive documentation and examples. The README provides a quick start guide covering installation, initialization, and data sending, along with a complete code example. An advanced iOS Objective-C guide is available for more complex configurations, including European Union data storage setup. A sample application called HelloMixpanel is included in the repository, and full API reference documentation is provided.
The library includes privacy-conscious features. It does not use IDFA, so it does not require user permission through Apple's AppTrackingTransparency framework. Users can be opted out of tracking using the optOutTracking method, and the library supports event and property dropping through Mixpanel's Lexicon interface.
According to GitGenius activity tracking, the repository shows a median issue and pull request response latency of 96.5 hours across 16 tracked items, with a mean latency of 1155.5 hours. The most active contributors tracked include zihejia with 10 events, santigracia with 5 events, and Suhail with 4 events. The most frequently applied issue labels are document and enhancement, each appearing once in tracked activity. The repository shares contributors with opencv/opencv, swiftlang/swift, and travis-ci/travis-ci based on GitGenius's contributor overlap analysis.
The library addresses common developer questions in its FAQ section, covering event tracking cessation, user opt-out procedures, event delivery timing, and App Store privacy compliance. Developers experiencing issues can enable logging by setting enableLogging to true for debugging purposes.