Latest 2.0.0
Homepage https://github.com/aporat/NSData-APNSToken
License MIT
Platforms ios 8.0
Authors

Build Status  
 

NSData+APNSToken adds apns device token method to NSData.

Use it

Copy the NSData+APNSToken class into your project or add this line to your Podfile:

pod 'NSData+APNSToken'

Quick API overview

After that you can get the apns token as a string from your app delegate:

import NSData_APNSToken

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
  let apnsToken : String = deviceToken.apnsToken()

}

Feedback are welcome

Please fill an issue for any feedback or if you missed any other convenience method.

Latest podspec

{
    "name": "NSData+APNSToken",
    "version": "2.0.0",
    "summary": "Category for NSData that converts APNS device tokens into simple NSString Objects",
    "homepage": "https://github.com/aporat/NSData-APNSToken",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Adar Porat": "[email protected]"
    },
    "source": {
        "git": "https://github.com/aporat/NSData-APNSToken.git",
        "tag": "2.0.0"
    },
    "social_media_url": "https://twitter.com/aporat28",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source"
}

Pin It on Pinterest

Share This