Commit f79bd8df authored by Simon MacDonald's avatar Simon MacDonald
Browse files

Merge pull request #44 from Deminetix/issue41

fix issue #41
parents 26c9c59c 24967b9e
Loading
Loading
Loading
Loading
+1 −0
Changes for README.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ Callback Parameter | Description
`data.sound` | `String` The name of the sound file to be played upon receipt of the notification.
`data.image (windows only)` | `String` The path of the image file to be displayed in the notification.
`data.additionalData` | `JSON Object` An optional collection of data sent by the 3rd party push service that does not fit in the above properties.
`data.additionalData.foreground` | `Boolean` Whether the notification was received while the app was in the foreground

#### Example

+1 −1
Changes for src/ios/AppDelegate+notification.m: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ static char launchNotificationKey;

    if (self.launchNotification) {
        PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"];

        pushHandler.isInline = NO;
        pushHandler.notificationMessage = self.launchNotification;
        self.launchNotification = nil;
        [pushHandler performSelectorOnMainThread:@selector(notificationReceived) withObject:pushHandler waitUntilDone:NO];
+4 −0
Changes for src/ios/PushPlugin.m: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -228,6 +228,10 @@
            }
        }

        if (isInline) {
            [additionalData setObject:[NSNumber numberWithBool:YES] forKey:@"foreground"];
        }
        
        [message setObject:additionalData forKey:@"additionalData"];
        
        // send notification message