0
は、私はdidFinishLaunchingWithOptions内のコードを追加し、PushKitフレームワークを使用しています通知を受け取ったときにPushKitを処理しますか?
let voipRegistry: PKPushRegistry = PKPushRegistry(queue: dispatch_get_main_queue())
voipRegistry.delegate = self
voipRegistry.desiredPushTypes = NSSet(object: PKPushTypeVoIP) as! Set<NSObject>
//トークンを登録
func pushRegistry(registry: PKPushRegistry!, didUpdatePushCredentials credentials: PKPushCredentials!, forType type: String!) {
}
//通知
func pushRegistry(registry: PKPushRegistry!, didReceiveIncomingPushWithPayload payload: PKPushPayload!, forType type: String!) {
let content = payload.dictionaryPayload["aps"] as? Dictionary<String,String>
let message = content!["alert"]
let notification = UILocalNotification()
notification.alertTitle = "Hifi"
notification.alertBody = message
notification.alertLaunchImage = "logo_white.png"
notification.soundName = "Glass.caf"
UIApplication.sharedApplication().presentLocalNotificationNow(notification)
}
を受けるIそのように実装されていますが、受信していませんg通知 didReceiveIncomingPushWithPayloadデリゲートメソッドで通知を処理する方法は?