Comments (10)
Everything appears to be working, it's just the token validation that needs fixing, and mention that perhaps Safari Push message can be sent only in production (as per Apple guidelines).
To send an acceptable payload:
notification.attributes_for_device = {
aps: {
alert: {
title: title,
body: body,
action: 'View'
},
'url-args' => ['boarding']
}
}
from rapns.
still checking, will do a pull request with further findings.
from rapns.
I haven't looked into Safari web push yet. What do the tokens look like that they fail?
from rapns.
Pull requests always welcome!
from rapns.
I got tokens back such as 078069A9EE1522D7C05DB462936D20E6E450ED7DE1A79FCFDE671CE3020688D3
, which are same length but the regex /^[a-z0-9]{64}$/i
does not match them.
from rapns.
two other things:
- as per the spec
"url-args": ["boarding", "A998"]
seems optional, while it is really not. - the spec is unclear on the token format, maybe you have better luck
from rapns.
The token you have there matches the regex you have (not looking at code yet). I think the regex should be /^[0-9a-f]{64}$/i
though.
from rapns.
you're right, I forgot the /i in the tests I made, however I have a validation exception while trying to send notification with the safari push token, digging further.
from rapns.
ok, it works without modification, it must have been something else that got in the way.
nothing to do 👍
from rapns.
I'd love to see a Wiki page for Safari Push ;)
from rapns.
Related Issues (20)
- Update at the end HOT 2
- Rapns Worker stalls and not setting notifications as delivered HOT 8
- Multiple databases support HOT 2
- NoMethodError raised when GCM post responds with 500
- add notification table HOT 4
- Rapns daemon process get killed HOT 4
- [ERROR] NoMethodError, undefined method `to_binary' for Rapns::Notification HOT 4
- GCM returns an error for messages with Spanish characters
- new release? HOT 5
- fatal: deadlock detected HOT 1
- fatal: deadlock detected
- ActiveRecord::ConnectionTimeoutError HOT 3
- NameError, uninitialized constant Rapns::Daemon::Apn HOT 3
- Notification received on the phone but the rapns_notifications database still list the notification as not delivered
- apns slow HOT 2
- Testing github-issues-import.
- Best practise for maintaining rapns_notifications table.
- Certificate has been revoked (Rails Console & Controller both) HOT 1
- @app should be @app.name
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 rapns.