Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix confusing README.textile #50

Open
hlung opened this issue May 24, 2012 · 6 comments
Open

Fix confusing README.textile #50

hlung opened this issue May 24, 2012 · 6 comments

Comments

@hlung
Copy link

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.

Regards

@alak
Copy link

alak commented Jun 10, 2012

+1 really

@daemonsy
Copy link

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 =(

@inspire22
Copy link

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

@daemonsy
Copy link

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.

@binchenX
Copy link

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

@richarddwalsh
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants