Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8482575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:51:37+00:00 2026-06-10T19:51:37+00:00

Hi i am using the gem https://github.com/PRX/apn_on_rails.git and followed the instructions to send push

  • 0

Hi i am using the gem https://github.com/PRX/apn_on_rails.git and followed the instructions to send push notifications for my iOS app.I created notifications like:

device = APN::Device.create(:token => "XXXX XXXX XXXXX XXXX XXXX .... XXXX")   
notification = APN::Notification.new   
notification.device = device   
notification.badge = 5   
notification.sound = true   
notification.alert = "My first push"   
notification.save 

And run the rake command in my local server:

rake apn:notifications:deliver 

to send the notifications.Everything went well but my mobile received nothing still. I checked the apn_notifications table and found the sent_at was still nil after running rake command.I saved several notifications in database but none of them were delivered (all the sent_at stayed nil).Well i got something as

$ rake apn:notifications:deliver --trace
** Invoke apn:notifications:deliver (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute apn:notifications:deliver

I included

begin
 require 'apn_on_rails_tasks'
rescue MissingSourceFile => e
 puts e.message
end

in my Rakefile.Is there anything I missed so that the notifications can’t be delivered?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:51:38+00:00Added an answer on June 10, 2026 at 7:51 pm

    I had the same behaviour, and for me, it turns out that I have used the incorrect PEM certificate. And once I converted the certificate from .P12 to .PEM properly, and put it in /config folder, it worked.

    One way to debug it, is that instead of waiting to use RAKE to push the delivery to Apple server, you can try calling
    APN::App.send_notifications
    immediately after the notification.save
    within your ruby/rails controller.
    from the log when running it, I saw that Apple is rejecting my connection, hence I knew my cert was incorrect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using gem rapns (https://github.com/ileitch/rapns) on my rails app. According to rapns doc, I
I am developing a Rails app using OmniAuth, OmniAuth-salesforce and this gem: https://github.com/heroku/databasedotcom I
I'm using the Turkee (https://github.com/aantix/turkee) gem with my Rails app to interface with Mechanical
I'm using this gem to access google docs in my app. https://github.com/gimite/google-drive-ruby I login
I'm using the following gem in an app - https://github.com/dekart/facebooker2 It seems to be
I am using successfully the mobylette rails gem: https://github.com/tscolari/mobylette I was wondering if anybody
I am using this very nice LinkedIn ruby gem (https://github.com/pengwynn/linkedin) for a project of
I'm using a variety of the GPGR gem (https://github.com/HHRy/gpgr) to do pgp encryption, and
I have been using the less-rails-bootstrap gem from https://github.com/metaskills/less-rails-bootstrap in my rails 3.1 project.
I'm using Rails 3.1 and the paypal_adaptive ( https://github.com/tc/paypal_adaptive ) gem in order to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.