From 9f522936a9271125e905a57875174da70b690e1c Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 5 Oct 2016 21:32:18 +0200 Subject: [PATCH 1/3] add AppEventsLogger.pushNotificationsDeviceToken --- Sources/Core/AppEvents/AppEventsLogger.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Sources/Core/AppEvents/AppEventsLogger.swift b/Sources/Core/AppEvents/AppEventsLogger.swift index 598d5e55..50f958c5 100644 --- a/Sources/Core/AppEvents/AppEventsLogger.swift +++ b/Sources/Core/AppEvents/AppEventsLogger.swift @@ -140,6 +140,19 @@ public class AppEventsLogger { log(event, accessToken: accessToken) } + //-------------------------------------- + // MARK: - Push Notification + //-------------------------------------- + + /** + Sets a device token to register the current application installation for push notifications. + */ + public static var pushNotificationsDeviceToken: Data? { + didSet{ + FBSDKAppEvents.setPushNotificationsDeviceToken(deviceToken) + } + } + //-------------------------------------- // MARK: - Flush //-------------------------------------- From 470052d2fdb79e9e9b50f31a6d821d52eb3fdfda Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 5 Oct 2016 21:55:51 +0200 Subject: [PATCH 2/3] typo fix --- Sources/Core/AppEvents/AppEventsLogger.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Core/AppEvents/AppEventsLogger.swift b/Sources/Core/AppEvents/AppEventsLogger.swift index 50f958c5..9ad8cf70 100644 --- a/Sources/Core/AppEvents/AppEventsLogger.swift +++ b/Sources/Core/AppEvents/AppEventsLogger.swift @@ -141,7 +141,7 @@ public class AppEventsLogger { } //-------------------------------------- - // MARK: - Push Notification + // MARK: - Push Notifications //-------------------------------------- /** From c6482db3869d5dec56241333a5302bb01dd05b19 Mon Sep 17 00:00:00 2001 From: Florian Date: Wed, 5 Oct 2016 22:34:57 +0200 Subject: [PATCH 3/3] typo in var --- Sources/Core/AppEvents/AppEventsLogger.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Core/AppEvents/AppEventsLogger.swift b/Sources/Core/AppEvents/AppEventsLogger.swift index 9ad8cf70..a0c347a9 100644 --- a/Sources/Core/AppEvents/AppEventsLogger.swift +++ b/Sources/Core/AppEvents/AppEventsLogger.swift @@ -149,7 +149,7 @@ public class AppEventsLogger { */ public static var pushNotificationsDeviceToken: Data? { didSet{ - FBSDKAppEvents.setPushNotificationsDeviceToken(deviceToken) + FBSDKAppEvents.setPushNotificationsDeviceToken(pushNotificationsDeviceToken) } }