IPhone port notifications not working in Rails app - apn_sender

I installed the rails app to send push notifications to my iphone app using this tutorial as my guide:

http://blog.thefrontiergroup.com.au/2011/05/sending-apple-push-notifications-in-rails-with-redis-and-apn_sender/

Everything seems to be working fine, but when I try to create a new notification in the console

APN.notify(my_token, :alert => "Test message", :badge => 4, :sound => true)

all it returns is an empty array! # => []

When I check feedback

feedback = APN::Feedback.new

I get a message:

APN :: Feedback: Connection not currently established to feedback.sandbox.push.apple.com on 2196

I am connected to redis OK, it looks like it is logging a lot of data:

[13058] 08 Jun 16:42:03 - DB 0: 2 keys (0 volatile) in 4 slots HT.
[13058] 08 Jun 16:42:03 - 0 clients connected (0 slaves), 922944 bytes in use
[13058] 08 Jun 16:42:08 - DB 0: 2 keys (0 volatile) in 4 slots HT.

( ) apple.

OSX 10.6. Ruby 1.9.2 Rails 3.1.0.rc1

- ?

iPhone? Base64 ?

+3
2

- , -, , .

:

# (regexp)
/(\w{8}\s){7}(\w{8})/

# randomly generated example string
f4134ff5 ec6504c2 a803da24 fb79cbcd 5243b00d d7fa625f 54c6b4ea 05768cf4
+3

APN:: : feedback.sandbox.push.apple.com 2196

.data .

feedback_data = APN::Feedback.new().data

, toke, APNS , , , Regex . . .

[a-zA-Z0-9]{64}
0

All Articles