phonegap-parse-plugin icon indicating copy to clipboard operation
phonegap-parse-plugin copied to clipboard

Update CDVParsePlugin.m

Open ihsanberahim opened this issue 10 years ago • 1 comments

Example of the way to hack.

    // Call existing method
    // [self swizzled_application:application didReceiveRemoteNotification:userInfo];
    //[PFPush handlePush:userInfo];

    NSString *message = userInfo[@"aps"][@"alert"];
    NSString *eventName = @"didReceiveRemoteNotification";

    [self.viewController.webView stringByEvaluatingJavaScriptFromString:
        [NSString stringWithFormat:@"setTimeout( function() { cordova.fireDocumentEvent('%@', {message:'%@'} ) }, 0);", eventName, message]];

    NSLog(@"%@ : %@", eventName, message);

ihsanberahim avatar May 09 '15 22:05 ihsanberahim

what problem is this trying to address? Just curious as I am considering integrating this plugin into an application

aaronksaunders avatar Jun 20 '15 15:06 aaronksaunders