aerogear-ios-push

程序名称:aerogear-ios-push

授权协议: Apache

操作系统: iOS

开发语言: Swift

aerogear-ios-push 介绍

aerogear-ios-push 是为 AeroGear UnifiedPush
Server
提供的 iOS 消息推送 SDK 开发包。

示例代码

  func application(application: UIApplication!, didRegisterForRemoteNotificationsWithDevicetoken devicetoken: NSData!) {
     // setup registration
    let registration = AGDeviceRegistration(serverURL: NSURL(string: "<# URL of the running AeroGear UnifiedPush Server #>")!)

    // attemp to register
    registration.registerWithClientInfo({ (clientInfo: AGClientDevice@R_241_4045@ion!) in
        // setup configuration
        clientInfo.devicetoken = devicetoken
        clientInfo.variantID = "<# Variant Id #>"
        clientInfo.variantSecret = "<# Variant Secret #>"

        // apply the token, to identify THIS device
        let currentDevice = UIDevice()

        // --optional config--
        // set some 'useful' hardware @R_241_4045@ion params
        clientInfo.operatingSystem = currentDevice.systemName
        clientInfo.osversion = currentDevice.systemVersion
        clientInfo.deviceType = currentDevice.model
        },

        success: {
            println("UnifiedPush Server registration succeeded")
        },
        failure: {(error: NSError!) in
            println("Failed to register, error: \(error.description)")
        })
}

aerogear-ios-push 官网

https://github.com/aerogear/aerogear-ios-push

相关编程语言

Acapela TTS 是一个为 iPhone 和 iPad 开发的 TTS 引...
二维码(QR Code)扫描静态库,扫描效率较高。
RegexKitLite 是一个轻量级的 Objective-C 的正则表...
一款基于ASIHttpReques开源的仿迅雷多线程断点续传功...
实现动态检测网络(wifi)状况,不需要用户手动刷新...
使用iphoneSDK官方NSXMLParserDelegate做的简单xml解...