Latest 0.1.6
Homepage https://github.com/0x0c/M2DPushNotificationManager
License MIT
Platforms ios 6.0, requires ARC
Authors

[![CI Status](http://img.shields.io/travis/Akira Matsuda/M2DPushNotificationManager.svg?style=flat)](https://travis-ci.org/Akira Matsuda/M2DPushNotificationManager)
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

First, request device token to APNS.

[[M2DPushNotificationManager sharedInstanceWithDelegate:self] registerDeviceTokenWithRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound) sendToProviderBlocks:^(NSString *token) {
    //send device token to your server.
}];

Second, decode device token

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    [[M2DPushNotificationManager sharedInstance] processDeviceToken:deviceToken];
}
//If you are using iOS8, please implenent this method.
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
    [application registerForRemoteNotifications];
}

All done.

Requirements

Installation

M2DPushNotificationManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "M2DPushNotificationManager"

Author

Akira Matsuda, [email protected]

License

M2DPushNotificationManager is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "M2DPushNotificationManager",
    "version": "0.1.6",
    "summary": "Get device token and send to your server.",
    "description": "Get device token from APNS and send to your server.",
    "license": "MIT",
    "authors": {
        "Akira Matsuda": "[email protected]"
    },
    "source": {
        "git": "https://github.com/0x0c/M2DPushNotificationManager.git",
        "tag": "0.1.6"
    },
    "homepage": "https://github.com/0x0c/M2DPushNotificationManager",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes"
}

Pin It on Pinterest

Share This