Commit 852cff0a authored by Simon MacDonald's avatar Simon MacDonald
Browse files

Issue #29: iOS only reads out 'aps' payload

parent ba598c3d
Loading
Loading
Loading
Loading
+8 −0
Changes for src/ios/PushPlugin.m: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -188,6 +188,9 @@
        NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:4];
        NSMutableDictionary* additionalData = [NSMutableDictionary dictionaryWithCapacity:4];
        
        
        for (id key in notificationMessage) {
            if ([key isEqualToString:@"aps"]) {
                id aps = [notificationMessage objectForKey:@"aps"];

                for(id key in aps) {
@@ -220,6 +223,11 @@
                        [additionalData setObject:value forKey:key];
                    }
                }
            } else {
                [additionalData setObject:[notificationMessage objectForKey:key] forKey:key];
            }
        }
        
        [message setObject:additionalData forKey:@"additionalData"];
        
        // send notification message