Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix confusing README.textile #50

hlung opened this Issue May 24, 2012 · 6 comments


None yet
6 participants

hlung commented May 24, 2012

I find it very confusing on this line...

app = APN::App.create(:apn_dev_cert => "PASTE YOUR DEV CERT HERE", :apn_prod_cert => "PASTE YOUR PROD CERT HERE")

The first thought I had when I saw "PASTE YOUR DEV CERT HERE" is to "Put the .cer file path in here". BUT! it is not! it should be the "content" of the .pem file. This is totally misleading and will cause newbies, like me, a lot of time to figure this out. I suggest you to change it to "PUT CONTENT OF .PEM FILE HERE - e.g. File.read('config/apn.pem')", so it would be much clearer.

And also you should tell to initialize RAILS_ROOT, APN::App::RAILS_ENV='development' in "config/configatron/development.rb and production.rb" as well. There will be a lot of iOS devs that don't know any ruby on rails come and pick this up and don't know how to do this.

And cannot use "~" sign for specifying directories, have to type in full path.


Alak commented Jun 10, 2012

+1 really

I got into this trap too. I thought it was the file path the apn_dev_cert was talking about, thinking it probably the file's path it's looking for =(

My other question is how do you get the token for a particular user, to send the notifications to?

Are you talking about the Rails side or iOS?

For Rails, I have the same issue. Since apn_on_rails generates its own classes/associations inside the gem, if you do not wish to mod the gem, you can do a

belongs_to :device, :class_name=> "APN::Device"

for your user model.

I fell into this trap as well and "PUT CONTENT OF .PEM FILE HERE" is much clearer.

I can't seem to resolve this issue at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment