Comments (11)
it was yanked, does somebody knows why?
from apns.
Any update on this? The new push notifications introduced in iOS7 won't work without v1.1.0.
from apns.
@sdaswani-lookout what do you mean it won't work without it?
from apns.
@jeremy-- From what I can tell, you can't send silent push notifications (i.e., no fields except 'content-available=1') with v1.0.0 of APNS. Have they worked for you?
from apns.
You're right, the content-available field does not get added to the json hash for some reason
from apns.
Yeah, so this is what notifications in the gem provided by rubygems (v1.0.0) looks like
module APNS
class Notification
attr_accessor :device_token, :alert, :badge, :sound, :other
def initialize(device_token, message)
self.device_token = device_token
if message.is_a?(Hash)
self.alert = message[:alert]
self.badge = message[:badge]
self.sound = message[:sound]
self.other = message[:other]
elsif message.is_a?(String)
self.alert = message
else
raise "Notification needs to have either a hash or string"
end
end
...
end
end
Doesn't even include a field for 'content-available' so it is completely omitted, just override the initializer and packager like so
module APNS
class Notification
attr_accessor :content_available
def initialize(device_token, message)
...
self.content_available = !message[:content_available].nil?
...
end
...
def packaged_message
...
aps['aps']['content-available'] = 1 if self.content_available
...
end
end
end
it also looks like they might pad message identifiers at the end and priorities... but I don't know if that has any effect on what happens with the notification. Hell you could just override the whole class with the code here somewhere in your program until they re-push v1.1.0 to rubygems
from apns.
Thanks for the info @jeremy-- ! I actually practiced some self-help and just pushed 1.1.0 to rubygems under a different name: http://rubygems.org/gems/apns-lookout Since my use is pretty limited (I'm only using it for silent pushes) and that use seems to work just fine I'm not worried about the issues that @jpoz says kept him from pushing 1.1.0.
@jpoz wants me to start helping out maintain this so I will do that and then hopefully we can push 1.1.0 back to rubygems then.
from apns.
1.1.0 was yanked due to #22
from apns.
what's the current status on this? is 1.1.0 ok to use? #22 doesn't seem to have been closed an inactive since Sept.
from apns.
Not sure - I switched to https://github.com/nomad/houston since it seemed like this gem wasn't being actively maintained.
from apns.
thanks.. i'm on my way to switching to rpush.
from apns.
Related Issues (20)
- Updating the badge counter without a push notification message HOT 2
- Duplicated pushes HOT 2
- Could it support mutil apps ? HOT 2
- License missing from gemspec
- APNS.send_notifications doesn't handle bad device token well HOT 1
- 256 bytes limitation HOT 2
- Using the gem behind a squid proxy
- Add support for persistent connections HOT 1
- Silent Push Notification HOT 5
- Passphrase support HOT 2
- APN over https
- APNS class file HOT 3
- send_notification returning nil with no status of notification HOT 2
- OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert certificate unknown HOT 1
- Working in development but not in production
- SocketError (getaddrinfo: Name or service not known):
- Emoji in alert are not working HOT 1
- 11
- 10 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 apns.