Comments (8)
I will need to investigate this further, but at first glance it would seem that whatever is getting printed out there is only the data within the 'aps' namespace of the notification. Can you provide some context of the code you are running on iOS so I can help.
from node-apn.
Thanks for the quick reply.
I created a gist https://gist.github.com/877914
with the objective-c class that handles all push-related things in my app
Background: am using phonegap to run the app in webview, so the class essentially acts as a glue between native ios stuff and the javascript app. The relevant methods at the bottom are [setNotificationMessage]
which stores the notification data in a global variable (notificationMessage
), and [notificationReceived]
, which converts the data into JSON (using the JSON Framework library: http://stig.github.com/json-framework/
) and invokes the app by call a delegate javascript method.
Note that the log statement from line 89 NSLog(@"setNotificationMessage:%@", notification);
spits out exactly the snippet below which rules out the JSON conversion as a potential culprit
setNotificationMessage:{
alert = "You have a new message";
badge = 3;
sound = "ping.aiff";
}
from node-apn.
Hum...I accidentally changed the status to 'closed' and apparently you can't re-open an issue unless you're a contributor on the repository. Can we consider this issue as open for all practical purposes ? :)
from node-apn.
Are you by any chance using the Urban Airship Push notification class?
from node-apn.
Yes and no - it's derived from the urbanairship plugin for phonegap, but it does not use urbanairship (plugs in directly into APN)
Sent from my iPhone
On Mar 20, 2011, at 2:27 AM, [email protected] wrote:
Are you by any chance using the Urban Airship Push notification class?
Reply to this email directly or view it on GitHub:
#5 (comment)
from node-apn.
Check your AppDelegate class because in the standard samples objectForKey:@"aps" is called on the notification dictionary in at least two places which will strip out the custom payload.
Try changing these lines to return the dictionary directly and see if that works.
from node-apn.
Bingo, you're absolutely right - I had completely forgotten about the very existence of these AppDelegate's methods. It worked like a charm after I implemented your suggestion.
Apologize for the trouble....can't say how much I appreciate you looking into it: Thank you !
from node-apn.
No problem, glad the library is of use to you.
from node-apn.
Related Issues (20)
- session.close is not a function HOT 1
- Is it possible to use dry-run parameter with this library?
- Push notification is not working on https
- 1
- Error: Socket unusable after connection. Hint: You may be using a certificate for the wrong environment HOT 1
- Deploying to Flywheel workflow failing saying inputs not valid
- ERR_CRYPTO_OPERATION_FAILED HOT 3
- High Vulnerability on node-forge-0.7.6.tgz (Vulnerable Library)
- iOS Push Notification Error: {reason: 'TopicDisallowed'} HOT 3
- How to send Communication Notifications? HOT 5
- Critical security vuln: jsonwebtoken HOT 2
- Live Activity Support
- How to use P12 files to send pushes HOT 7
- Send Push Notification To Apple Watch
- apn write failed: GOAWAY: PROTOCOL_ERROR Stream 5 does not exist HOT 1
- The future of `node-apn`
- Show In Foreground?
- Dynamically or using RESTful API to add device
- What is the right way to send a silent push notification(content-available = 1) in 2024?
- Port from http to fetch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-apn.