Apple News Push API Client and Command Line Tool

I’ve just open sourced a library for interacting with the Apple News Push API. For those who are unfamiliar, Apple News is an iOS app by Apple that made its debut at Apple’s Worldwide Developer Conference (WWDC) in 2015 with the release of iOS 9. It has been pre-installed on all iOS versions since then (Much like calculator, or calendar)

Apple News is a bit different from most newsreader apps. It’s not based on RSS or web scraping. Instead, you build the article according to Apple’s spec, and push it to an API.

The Apple News format is a proprietary JSON defined here. Essentially, you build up an array of “component” objects, like paragraphs, images, and tweets which comrpise your story.

At first pass, working with the push API was a challenge. It involved sending multipart POST requests with images bundled up. Authentication was tricky to get right. The HMAC signature needs to be calculated with the body of the multipart request included.

For now, I’m hoping this library makes it simpler to interact with Apple’s News Push API. Enjoy!