{"id":18763802,"url":"https://github.com/roverdotcom/alooma-ios","last_synced_at":"2025-12-06T05:30:21.984Z","repository":{"id":146066479,"uuid":"248269210","full_name":"roverdotcom/alooma-ios","owner":"roverdotcom","description":null,"archived":false,"fork":false,"pushed_at":"2020-05-26T18:32:46.000Z","size":4034,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-20T19:29:38.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roverdotcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-18T15:25:29.000Z","updated_at":"2020-05-22T18:51:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"c11911a8-eb52-4818-be0b-11b881f81b80","html_url":"https://github.com/roverdotcom/alooma-ios","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/roverdotcom/alooma-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Falooma-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Falooma-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Falooma-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Falooma-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roverdotcom","download_url":"https://codeload.github.com/roverdotcom/alooma-ios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Falooma-ios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27535806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-06T02:00:06.463Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:27:30.747Z","updated_at":"2025-12-06T05:30:21.708Z","avatar_url":"https://github.com/roverdotcom.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alooma-iOS - an iOS Event Tracking Library\n\n[![CI Status](http://img.shields.io/travis/Aloomaio/iossdk.svg?style=flat)](https://travis-ci.org/Aloomaio/iossdk)\n[![Version](https://img.shields.io/cocoapods/v/Alooma-iOS.svg?style=flat)](http://cocoapods.org/pods/Alooma-iOS)\n[![License](https://img.shields.io/cocoapods/l/Alooma-iOS.svg?style=flat)](http://cocoapods.org/pods/Alooma-iOS)\n[![Platform](https://img.shields.io/cocoapods/p/Alooma-iOS.svg?style=flat)](http://cocoapods.org/pods/Alooma-iOS)\n\n## Installation\n\nIntegrating the Alooma-iOS library can be done in a few simple steps, using [CocoaPods](http://cocoapods.org).\n\n### To install CocoaPods:\n\n1. Open a terminal and run `sudo gem install cocoapods`\n2. Run `pod setup`\n\n### To integrate the Alooma-iOS library in your project:\n\n1. Create a file called `Podfile` in the root directory of your project\n2. Add the following line to your Podfile:\n\n```ruby\npod \"Alooma-iOS\"\n```\n\n3. Close Xcode\n4. Open a terminal and run `pod install` in the root directory of your project.\n5. Open the new Xcode workspace (`\u003cyour-project\u003e.xcworkspace`)\n\n### Compatibility\n\nThe Alooma-iOS library is a modified version of the [Mixpanel-iphone](http://www.github.com/mixpanel/mixpanel-iphone/) library, trimmed down to the bare event tracking necessities.\n\nTo integrate Alooma-iOS, you need to be using Xcode 5 and a Base SDK of iOS 7.0. The library will work with deployment targets of iOS 6.0 and above.\n\n## Initialization\n\nTo use the Alooma-iOS library, you must first initialize it with the hostname of your Alooma endpoint, and your token. Since this should be done only once, it makes sense to initialize Alooma-iOS when your app finishes launching:\n\n```objectivec\n#import \u003cAlooma-iOS/Alooma.h\u003e\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n\n    /* ... */\n    \n    [Alooma sharedInstanceWithToken:@\"\u003cyour Alooma API token\u003e\" serverURL:@\"\u003cyour Alooma endpoint\u003e\"];\n    \n    return YES;\n}\n```\n\nOnce initialized, you can use the Alooma-iOS library anywhere in your code just by calling the `sharedInstance` method:\n\n```objectivec\n    Alooma *alooma = [Alooma sharedInstance];\n```\n\n## Sending events\n\nTo send an event to Alooma, you can stick to the Mixpanel convention of `track:properties:`, or you can use the more free-form `trackCustomEvent:` to send a JSON serializable NSDictionary object.\n\n### The Mixpanel Way\n\nAs we mentioned, Alooma-iOS is forked from Mixpanel, therefore it supports all of the methods implemented by the Mixpanel library:\n\n- `track:`\n- `track:properties:`\n- `timeEvent:`\n- `registerSuperProperties:` \u0026 `registerSuperPropertiesOnce:`\n- `identify:`\n- `flush` \u0026 `reset`\n\nBasic event tracking can be implemented with the following code:\n\n```objectivec\nAlooma *alooma = [Alooma sharedInstance];\n\n// Track an event just with a type\n[alooma track:@\"Event-type1\"];\n\n// Track an event with a type \u0026 properties\n[alooma track:@\"Event-type2\" properties:@{\n    @\"prop1\": @\"abc\",\n    @\"prop2\": 123\n}];\n```\n\nUsing these methods will send events in the following format:\n\n```js\n{\n    \"event\": \"Event-type2\",\n    \"properties\": {\n        \"prop1\": \"abc\",\n        \"prop2\": 123,\n        /* \n           additional properties added by the library:\n           distinct_id, $os, time, sending_time, $model\n           $manufacturer, $wifi, $screen_width, \n           $screen_height, ...\n        */\n    }\n}\n```\n\nDocumentation of the rest of the Mixpanel provided functions can be found on the [Mixpanel website](https://mixpanel.com/help/reference/ios).\n\n### The Custom Way\n\nIn case you haven't been using Mixpanel, and all you want to do is send custom JSON objects, you can use the following snippet:\n\n```objectivec\nAlooma *alooma = [Alooma sharedInstance];\n\n[alooma trackCustomEvent:@{\n    @\"custom-field1\": @\"event-type\",\n    @\"custom-field2\": @\"abc\",\n    @\"custom-field3\": 123\n}];\n```\n\nUsing this method will send events in the following format:\n\n```js\n{\n    \"custom-field1\": \"event-type\",\n    \"custom-field2\": \"abc\",\n    \"custom-field3\": 123,\n    \"properties\": {\n        /* \n           additional properties added by the library:\n           distinct_id, $os, time, sending_time, $model\n           $manufacturer, $wifi, $screen_width, \n           $screen_height, ...\n        */\n    }\n}\n```\n\n### General Notes\n\n- Alooma-iOS adds additional properties to each event:\n  - time - the epoch time (seconds) when the event was tracked\n  - sending_time - the epoch time (seconds) when the event was actually sent (in case the device was offline)\n  - distinct_id - a unique identifier, identifying the device\n  - additional fields and their values can be seen in the function [collectAutomaticProperties](https://github.com/Aloomaio/iossdk/blob/master/Alooma-iOS/Alooma.m#L781)\n\n- The Alooma-iOS stores events in an internal queue of events, to be sent when the device is online. The queue has a fixed size of 500 events. If the device is offline and the queue fills up, the 501th event will cause the 1st (oldest) event to be popped from the queue and discarded.\n\n\n## Testing with our SampleApp\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory.\nOpen the `SampleApp.xcworkspace` and run the app.\n\n## Author\n\nAlooma, info@alooma.com\n\n## License\n\nAlooma-iOS is available under the Apache v2 license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Falooma-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froverdotcom%2Falooma-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Falooma-ios/lists"}