Comments (5)
Can you elaborate or provide a snippet demonstrating your problem?
from apnagent.
This is from the documentation for apnagent
.alert (key, value)
@param{ String | Object }alertbody, string key or object of alert settings
@param{ Mixed }value(when first argument is a string)
@return{this} for chaining
Sets variables to be included in the alert dictionary for the aps portion of the payload. If you wish to set a singlular message, set the body key. You may also set any of the other values outlined in the APNS documentation and the codecs will optimize the payload format for delivery.
Allowed keys:
body
action-loc-key
loc-key
loc-args
launch-image
if you notice in the above list, title is not listed as one of the available keys.
but on this page from apple : https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html in table 5.2, you will see title is one of apple's accepted keys from alert.
I tested sending .alert({"body":"some body text", "title": "some title"})
and the body went... the title didn't.
I needed it for this project I am on, so I quickly had to change to another library (apn), but I would prefer to use apnagent if just because the documentation is so snazzy.
from apnagent.
I know I've been using it in my project, but I have to admit I may not have committed that to everyone. I'll let you know in the morning when I'm at a computer that has all my resources
from apnagent.
The complete set was committed last July ExploreMqt@00e71c3
from apnagent.
Not works when I use a title attribute in the alert json.
agent.createMessage()
.device("f2bd91c92dc8de2d67ba064eddce483e5f843ed4143456c3cde46dd99fd3dbfa")
.alert({
"title": "Push Test",
"body": "Hello"
})
.sound("default")
.send(function (err) {
if (err) {
console.log("[cb] If you se me something went terribly wrong.");
} else {
console.log("Success");
}
});
from apnagent.
Related Issues (20)
- Where is 'error mitigation' section HOT 1
- TypeError: value is out of bounds HOT 1
- Queue is never restarted after SSL error HOT 7
- Agents randomly stop reconnecting HOT 1
- Consistent memory leaks HOT 6
- Gateway sporadically stops sending notifications HOT 3
- sending push in bulk HOT 3
- Site Down HOT 3
- Change to APNS HOT 1
- Sending push notifications in production environment not working HOT 2
- node agent/_header.js HOT 1
- Seeking Maintainer
- Decoder Stream 11 not implemented HOT 9
- Can't use agent on openshift server HOT 10
- APN agent connected coming false HOT 2
- Notification not received when device come from offline to online HOT 2
- sending MDM push notification to APNS
- Increment Badge Count HOT 1
- Collapse-id HOT 1
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 apnagent.