Browse files

Added documentation.

  • Loading branch information...
1 parent 8e2a6a3 commit 68ae1d846398549069a83172b77875367f025b65 @markbates markbates committed Jul 23, 2009
Showing with 44 additions and 13 deletions.
  1. +40 −9 README
  2. +4 −4 Rakefile
@@ -1,11 +1,16 @@
-Apple Push Notification
+APN on Rails
+(Apple Push Notifications on Rails)
-This plugin helps you use the Apple Push Notification system.
+This gem is a re-write of a plugin that was written by Fabien Penso and Sam Soffes.
+Their plugin was a great start, but it just didn't quite reach the level I hoped it would.
+I've re-written, as a gem, added a ton of tests, and I would like to think that I made it
+a little nicer and easier to use.
Converting Your Certificate
Once you have the certificate from Apple for your application, export your key
and the apple certificate as p12 files. Here is a quick walkthrough on how to do this:
@@ -15,18 +20,44 @@ and the apple certificate as p12 files. Here is a quick walkthrough on how to do
Now covert the p12 file to a pem file:
- $ openssl pkcs12 -in cert.p12 -out apple_push_notification.pem -nodes -clcerts
+ $ openssl pkcs12 -in cert.p12 -out apple_push_notification_production.pem -nodes -clcerts
+Put 'apple_push_notification_production.pem' in config/
-Put `apple_push_notification.pem` in config/
+If you are using a development certificate, then change the name to apple_push_notification_development.pem instead.
-Simply run the following commands to add apple-push-notification as a submodule to your repo, a plugin to your rails app, and install it.
+From RubyForge:
+ $ sudo gem install apn_on_rails
+Or, if you like to live on the edge:
+ $ sudo gem install markbates-apn_on_rails --source=
+Then you just add the following require, wherever it makes sense to you:
+ require 'apn_on_rails'
+If you like to use the built in Rails gem management:
+ config.gem 'apn_on_rails'
+Or, if you like to live on the edge:
+ config.gem 'markbates-apn_on_rails', :lib => 'apn_on_rails', :source => ''
+Once you have the gem installed you need to add the following to your Rakefile so you can use the
+Rake tasks that ship with APN on Rails:
+ begin
+ require 'apn_on_rails_tasks'
+ rescue MissingSourceFile => e
+ puts e.message
+ end
+Now, to create the tables you need for APN on Rails, run the following task:
+ $ rake apn:db:migrate
- $ cd ~/my_rails_app
- $ script/plugin install git://
- $ rake apn:migrate
+That's it, now you're ready to start creating notifications.
@@ -4,11 +4,11 @@ require 'gemstub'
Gemstub.test_framework = :rspec
Gemstub.gem_spec do |s|
- # s.version = "0.0.1"
- # s.rubyforge_project = "apn_on_rails"
- # s.add_dependency('')
+ s.version = "0.0.1"
+ s.rubyforge_project = "magrathea"
+ s.add_dependency('configatron')
Gemstub.rdoc do |rd|
- rd.title = "apn_on_rails"
+ rd.title = "APN on Rails"

0 comments on commit 68ae1d8

Please sign in to comment.