Skip to content

Instantly share code, notes, and snippets.

@brunojppb
Created August 4, 2015 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunojppb/ac4e8b2644e7916a16ad to your computer and use it in GitHub Desktop.
Save brunojppb/ac4e8b2644e7916a16ad to your computer and use it in GitHub Desktop.
# config/initializers/apns.rb
# Default value is 'gateway.sandbox.push.apple.com'
APNS.host = "gateway.sandbox.push.apple.com"
# Path to your development.pem file
APNS.pem = File.join(Rails.root, "development.pem")
# if your iOS App is available on the App Store, Use the production.pem
# and change the host
if Rails.env.production?
APNS.host = "gateway.push.apple.com"
APNS.pem = File.join(Rails.root, "production.pem")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment