Cordova does not receive the content push
Opened this issue · 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: /
Is this on iOS or android? Are you registering on device ready?
ian
On Jul 3, 2015, at 11:46 AM, Cleiton Tavares notifications@github.com 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.
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
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
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
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.
@urbanmania hey, unfortunately it did not work
@grrrian So what should I do for my knowledge in ios development and objc eh too small, if you can help me
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 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
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
i have fixed it on android by manually installing this plugin https://github.com/phonegap/phonegap-plugin-push .