Commit 0157a9f4 authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

Fix 'Invalid type in JSON write (__NSDate)' after updating notification

parent 3b159c88
Loading
Loading
Loading
Loading
+8 −0
Changes for src/ios/APPLocalNotificationOptions.m: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -186,6 +186,14 @@ NSString* const DEFAULT_SOUND = @"res://platform_default";
 */
- (NSDictionary*) userInfo
{
    if ([dict objectForKey:@"updatedAt"]) {
        NSMutableDictionary* data = [dict mutableCopy];

        [data removeObjectForKey:@"updatedAt"];

        return data;
    }

    return dict;
}

+4 −4
Changes for src/ios/UIApplication+APPLocalNotification.m: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@

    for (UILocalNotification* notification in notifications)
    {
        [options addObject:notification.userInfo];
        [options addObject:notification.options.userInfo];
    }

    return options;
@@ -244,7 +244,7 @@
    for (UILocalNotification* notification in notifications)
    {
        if (notification.type == type) {
            [options addObject:notification.userInfo];
            [options addObject:notification.options.userInfo];
        }
    }

@@ -267,7 +267,7 @@
        notification = [self localNotificationWithId:id];

        if (notification) {
            [options addObject:notification.userInfo];
            [options addObject:notification.options.userInfo];
        }
    }

@@ -292,7 +292,7 @@
        notification = [self localNotificationWithId:id];

        if (notification && notification.type == type) {
            [options addObject:notification.userInfo];
            [options addObject:notification.options.userInfo];
        }
    }