I'm doing whatever i can to send ios push notifications to a react-native app and for that app to display notifications.
I've been trying to figure this out for months.
I have a local Parse server running with the following config:
{ "appId": "org.reactjs.native.example.ReactZeroNotifications", "masterKey": "masterkey", "databaseURI": "mongodb://localhost/test", "push": { "ios": [ { "pfx": "reactnotification-dev.p12", "bundleId": "org.reactjs.native.example.ReactZeroNotifications", "passphrase": "*", "production": false }, { "pfx": "reactnotification-prod.p12", "bundleId": "org.reactjs.native.example.ReactZeroNotifications", "passphrase": "*", "production": true } ] } }
I then send a post request to http://localhost:1337/parse/push with the following headers:
X-Parse-Application-Id: org.reactjs.native.example.ReactZeroNotifications X-Parse-Master-Key: masterkey
and the following raw JSON data:
{"where": {"deviceType": "ios"},"data":{"alert": "hello NOTIFICATIONS!!"}}
Meanwhile I have a react-native app running with pushnotification linked as a library and I receive the register event with a token.
However, my notification event never goes off and I never see a notification at the top of my iPhone as I'm trying to accomplish.
(Note: I just want to see a notification on a react-native app... no matter how this is accomplished, I feel as if I could figure out the rest if I can just get it to work once)
As per recommendation i turned on verbose on the parse server and received the following after posting:
verbose: sending push to 0 installations verbose: sent push! 0 success, 0 failures
0 comments:
Post a Comment