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

Cordova does not receive the content push

Open cleiton-tavares opened this issue 9 years ago • 11 comments

My app receives notification of the push, but when the application is closed can not receive the push data when opening the app

I'm using window.onNotification and it works with open app: /

cleiton-tavares avatar Jul 03 '15 14:07 cleiton-tavares

Is this on iOS or android? Are you registering on device ready?

ian

On Jul 3, 2015, at 11:46 AM, Cleiton Tavares [email protected] wrote:

My app receives notification of the push, but when the application is closed can not receive the push data when opening the app

I'm using window.onNotification and it works with open app: /

— Reply to this email directly or view it on GitHub.

grrrian avatar Jul 03 '15 15:07 grrrian

in iOS, but recorded in the device ready I can see the instalation-id in the opening of the app put it in the background can not receive the push coming from the data when I open the application

cleiton-tavares avatar Jul 03 '15 15:07 cleiton-tavares

I actually have a similar issue. I've got two computers I use to build on (work and home) and when I build using my work machine I don't get the pushes (but devices register normally and are subscribed to channels) but if I build on my home machine everything works. I just assumed it was something to do with the setup of the project on my work machine and I haven't looked into it as this is a side project that I mainly work on at home

urbanmania avatar Jul 03 '15 15:07 urbanmania

btw, just removed the ios platform and re-added and now the work build also gets the push, so perhaps that's something you might want to try @cleiton-tavares

urbanmania avatar Jul 03 '15 15:07 urbanmania

If you are curious in debugging in XCode, you can look at this function of CDVParsePlugin.m : (BOOL)swizzled_application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions (line 195). This function gets called when the app gets launched as a result of the user tapping the notification . launchOptions should contain the notification payload.

grrrian avatar Jul 03 '15 16:07 grrrian

@urbanmania hey, unfortunately it did not work

cleiton-tavares avatar Jul 03 '15 17:07 cleiton-tavares

@grrrian So what should I do for my knowledge in ios development and objc eh too small, if you can help me

cleiton-tavares avatar Jul 03 '15 17:07 cleiton-tavares

You can put breakpoints (by clicking on the line number). The following lines should be called: 210, (and if the app is running in foreground or background) 251. After line 251 is executed, your callback should be called.

grrrian avatar Jul 03 '15 18:07 grrrian

@grrrian I could debug and see the value that this coming, but it does not yet know how to send js interface for my app to see this data when opened

cleiton-tavares avatar Jul 06 '15 14:07 cleiton-tavares

This happens for me as well. I have added the plugin using cordova plugin add <info> When i build by running ionic build ios, build is failing with http://pastebin.com/Y9K5AAR1

radkris-git avatar Nov 03 '15 03:11 radkris-git

i have fixed it on android by manually installing this plugin https://github.com/phonegap/phonegap-plugin-push .

B3rs avatar Nov 11 '15 09:11 B3rs