Skip to content

Commit 52b7115

Browse files
committed
swift AppDelegate - noPushPayload variable is wrong
Line 59, the variable noPushPayload is wrong. The variable is true when there is in fact push pay load. You should compare to nil like this: noPushPayload = options[UIApplicationLaunchOptionsRemoteNotificationKey] == nil; If options[UIApplicationLaunchOptionsRemoteNotificationKey] is nil, then there is no payload... Thanks,
1 parent a4eb075 commit 52b7115

File tree

1 file changed

+1
-1
lines changed
  • ParseStarterProject/iOS/ParseStarterProject-Swift/ParseStarterProject

1 file changed

+1
-1
lines changed

ParseStarterProject/iOS/ParseStarterProject-Swift/ParseStarterProject/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
5656
let oldPushHandlerOnly = !self.respondsToSelector("application:didReceiveRemoteNotification:fetchCompletionHandler:")
5757
var noPushPayload = false;
5858
if let options = launchOptions {
59-
noPushPayload = options[UIApplicationLaunchOptionsRemoteNotificationKey] != nil;
59+
noPushPayload = options[UIApplicationLaunchOptionsRemoteNotificationKey] == nil;
6060
}
6161
if (preBackgroundPush || oldPushHandlerOnly || noPushPayload) {
6262
PFAnalytics.trackAppOpenedWithLaunchOptions(launchOptions)

0 commit comments

Comments
 (0)