Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mib200/mixpanel-cordova
Cordova Plugin that wraps latest Mixpanel SDK for Android and iOS
https://github.com/mib200/mixpanel-cordova
Last synced: 29 days ago
JSON representation
Cordova Plugin that wraps latest Mixpanel SDK for Android and iOS
- Host: GitHub
- URL: https://github.com/mib200/mixpanel-cordova
- Owner: mib200
- License: mit
- Created: 2015-07-26T16:01:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-24T21:01:03.000Z (over 9 years ago)
- Last Synced: 2023-04-05T15:32:17.884Z (over 1 year ago)
- Language: Objective-C
- Homepage: https://github.com/mib200/mixpanel-cordova
- Size: 773 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Cordova Plugin that wraps Mixpanel SDK for Android and iOS
- [android sdk version 4.6.2]
- [ios sdk version 2.8.2]#### Install
```
cordova plugin add https://github.com/mib200/mixpanel-cordova.git
```For Android, AndroidManifest.xml is automatically updated to work with MixPanel push.
For IOS, please add following code in AppDelegate.m
```
#import "MixpanelPlugin.h"- (id) getCommandInstance:(NSString*)className
{
return [self.viewController getCommandInstance:className];
}- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
MixpanelPlugin *mixpanelHandler = [self getCommandInstance:@"Mixpanel"];
[mixpanelHandler didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
{
// Show alert for push notifications recevied while the
// app is running
[[Mixpanel sharedInstance] trackPushNotification:userInfo];
NSString *message = [[userInfo objectForKey:@"aps"]
objectForKey:@"alert"];
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@""
message:message
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
}
```##### Keywords
mixpanel, plugin cordova, phonegap, ionic, android, ios