We’ve open-sourced Action Native Push, a Rails gem for sending push notifications to mobile platforms. It supports both Apple and Google push notification services.
Why did we build it?
We created it to migrate off Amazon SNS and Pinpoint, as part of our broader cloud exit. We’re using it in Basecamp and HEY to send more than 10 million push notifications per day without a hitch.
Action Native Push relies on HTTP/2 persistent connections to the Apple Push Notification service, which significantly reduced job duration compared to our previous HTTP/1 setup with AWS Pinpoint:
How does it work?
The gem connects directly to the Apple (APNs) and Google (FCM) push notification services. It handles retries, rate-limiting, and deleting dead devices automatically. Configure each platform with your credentials, and you can start sending notifications like this:
device = ApplicationPushDevice.create! \
name: "iPhone 16",
token: "6c267f26b173cd9595ae2f6702b1ab560371a60e7c8a9e27419bd0fa4a42e58f",
platform: "apple"
notification = ApplicationPushNotification.new \
title: "Hello world!",
body: "Welcome to Action Native Push"
notification.deliver_later_to(device)
Version 0.1.0 is available now. You can read more on GitHub.
We hope you find it useful!
Sign up to get posts via email,
or grab the RSS feed.