Under The Bridge Under The Bridge

Tag: Notifications
It’s iOS 12 Submission Day!

Just in case you missed this morning’s email, time to download the GMs and Submit Your Apps to the App Store to make launch day:

You can now submit apps that take advantage of the powerful new capabilities in the next release of iOS, watchOS, and tvOS. Build your apps using Xcode 10 GM seed, test with the latest releases of iOS 12, watchOS 5, and tvOS 12, and submit them for review.

Starting March 2019, all new apps and app updates for iPhone, including universal apps, will need to be built with the iOS 12 SDK and support iPhone XS Max. All new apps and app updates for Apple Watch will need to be built with the watchOS 5 SDK and support Apple Watch Series 4…

A relatively easy one this year for most of you we imagine, although it’s always a good idea to review Apple Platform SDK API Differences and ASCIIwwdc quickly at least. Or, y’know, bingewatch the WWDC videos while you wait for the last season of Game of Thrones or whatever.

One thing to check for specifically, if you have an iPad version that hardcodes bar heights, although you really should have learned better than that by now:

iPad Navigation Bar and Toolbar Height Changes in iOS 12

Although they didn’t make it out today, it looks suspiciously like there’ll be notched Pads in the not so distant future, doesn’t it now?

iOS 12: Notable UIKit Additions covers the minor security conveniences you’ll probably want to do a little work to take advantage of to make your users adore you.

Notifications got some fairly significant upgrades you’ll want to take a look at if you tell your users about things:

What’s new in notifications in iOS 12

New in iOS 12: Adding a Custom UI and Interactivity in Local and Push Notifications

No doubt you’ve heard of Siri Shortcuts, which definitely get the award for Niftiest 2018 New iOS Tech:

WWDC 2018 for iOS developers: Siri Shortcuts

Introduction to Siri Shortcuts in iOS 12

Shortcuts: A New Vision for Siri and iOS Automation

Speaking of nifty new tech, anyone who thought ARKit wasn’t a truly Important. Future. Direction, the advances this year should be fairly conclusive evidence of that:

ARKit 2: Bringing richer experiences through collaboration, enhanced detection, and greater realism

AR Face Tracking Tutorial for iOS: Getting Started

An Introduction to AR Quick Look in iOS 12

Saving and Restoring World-mapping Data to Create a Persistence AR Experience

Not quite as overtly nifty, but downright magical for those of us dating to when it was arguable that machines could ever learn, are the various advances relating to Core ML and its helper projects this year of Create ML and Natural Language and all:

What’s New in Core ML 2

Create ML: How to Train Your Own Machine Learning Model in Xcode 10

Training a Text Classifier with Create ML and the Natural Language Framework

Natural Language in iOS 12: Customizing tag schemes and named entity recognition

NSHipster’s NLLanguage​Recognizer and IOS 12

Creating a Prisma-like App with Core ML, Style Transfer and Turi Create

And of course there’s Xcode 10 and Swift 4.2 to learn … we’ll have updates on those too once we finish converting our projects to iOS 12 savviness!

UPDATES:

Apple has new videos on building for the new Xes, the new Watches, and Complications

Check out the Wenderlich iOS 12 Launch Party! for new books, updated books, and $9K of giveaways!

Great UX walkthrough here for Surfacing Shortcuts

60+ great UI kits for iOS engineers has iOS 12 resources

How iOS Apps Adapt to the iPhone XS Max and iPhone XR Screen Sizes

Supporting iPhone XS Max and XR

Use x-callback-url with Shortcuts

Designing and Developing for Siri Shortcuts

Siri Shortcuts Tutorial in iOS 12

iOS12 – Password AutoFill, Automatic Strong Password, and Security Code AutoFill

iOS 12 Password Tools: Improving User Security and Experience

Push Notifications Tutorial: Getting Started

Notification Tokenism

So, did you catch WWDC 724 yet? It’s less than 15 minutes, check it out:

What’s New in the Apple Push Notification Service (transcript)

Starting with a review of the HTTP/2 based provider API, you will learn about an important new feature: Token Based Authentication. Learn to connect to APNs using authentication tokens for sending pushes via the HTTP/2 API, relieving you of the overhead associated with maintaining valid certificates.

Ah, yes. Longtime readers will remember various instances of untrammelled joy (where by “joy” we mean “near-homicidal frenzy”) APNs has provided over the years, so this is a very interesting indeed development. Full details were published September 20 at

Local and Remote Notification Programming Guide / Apple Push Notification Service

and announced September 22. So let’s check this out, shall we? Especially as we got the annually dreaded “This certificate will no longer be valid in 30 days.” email day before yesterday, which makes the timing entirely apropos!

Step 1: Oh look, now under certs in the Dev Portal we have this new “APNs Auth Key” option! So add one, and…

Step 2: Read the instructions:

Download, Install and Backup

Download your Authentication Key to your Mac, then double click the .key file to install in Keychain Access. Make sure to save a back up of your key in a secure place. It will not be presented again and cannot be retrieved at a later time.

Step 3: Be confused as the download gives you a .p8 file, not a .key file, and it’s not evident how you get that into the Keychain.

Step 4: Check out the discussion on the dev boards:

It’s a PEM-encoded, unencrypted PKCS#8 file. You can inspect it with openssl pkcs8 -nocrypt -in <your_file.p8>, but you’ll need a newer version of OpenSSL than the one that ships with El Capitan (I’m not sure which version comes with Sierra). I’m not sure how to import it into the Keychain, but I also haven’t run into a situation where having it in the Keychain would be helpful (other than just for storage).

Step 5: OK then, let’s find some service that can use this shiny new .p8 file then…

Step 6: ¯\_(ツ)_/¯ Not much out there yet!

Alright, so we’ll keep working with a cert-based process for the moment then, check for UPDATES! below once we find some. In the meantime, development tools that can work with the shiny newness? Hmmmm … looks like you’re pretty much on your own there too as we write this. Right then, if you know of any token-supporting services or tools, hit the comments section!

If you’re proactive enough to want to help move the development tools scene along, our goto for APNs tinkering for a while now has been Knuff: “The debug application for Apple Push Notification Service (APNs).” along with Knuff-Framework “just add it to your application and the phone will be visible under “Devices”” and Knuff – The APNs Debug Tool on the App Store! Pretty complete ecosystem there and we strongly encourage helping out with it if you’re interested in this space.

If you’re new to this APNs thing, or If you’d simply like a straightforward HTTP page to use for testing, check out this new site PushTry.com to, eponymously enough, try pushing:

pushtry.jpeg

Nicely done tutorials for both iOS and Android, clean and functional; definitely recommend you give that a pushtry. And they’re working on token support too!

Should you be looking to get this on your server side ASAP, a quick look around for projects at least using HTTP/2 APNs, that being kinda the floor for ‘actively maintained’ currently, in a variety of environments turns up these:

VaporAPNS “is a simple, yet elegant, Swift library that allows you to send Apple Push Notifications using HTTP/2 protocol in Linux & macOS. It has support for the brand-new Token Based Authentication but if you need it, the traditional certificate authentication method is ready for you to use as well. Choose whatever you like!”

swift-apns: “Swift Framework for sending Apple Push Notification over HTTP/2 API”

node-apn: “A Node.js module for interfacing with the Apple Push Notification service.”

ApnsPHP: “Apple Push Notification & Feedback Provider”

APNS/2 “is a go package designed for simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the new HTTP/2 Push provider API.”

And again, if you have good … or bad … experiences with any particular piece of APNs server kit, let us know!

UPDATES:

docker-swift-apns: “A collection of Docker images to build APNS providers in Swift”

Push Notifications and Local Notifications – Tutorial

Push Notifications Tutorial: Getting Started

NWPusher: “OS X and iOS application and framework to play with the Apple Push Notification service (APNs)”

iOS remote push notifications in a nutshell