Push Notifications
I approached Allen VK3ARH to see if he was happy to handle the pushes from his website when new Spots came in. After much experimentation, we finally got it to work and the beta testers got to experience something new. Out of the blue and when they least expected it (possibly in a meeting at work), their phones came alive with the sound of goats and kookaburras. I like that element of surprise!! I’m sure their colleagues would have laughed about it too. Someone commented the other day when I was in the city that they heard a kookaburra (unusual for the city), I said no that’s my app. It’s a good talking point.
To explain how Push Notifications work in PnP. Basically, my app gets a rather long token when it registers with Apple from the app, then it is sent to ParksnPeaks.org. The token is changed by Apple periodically. Once a new Spot comes into the server, Allen has written a routine which automatically sends the new Spot detail through to the Apple Push Notification Service (APNS) which then sends the notification to the devices registered for PnP. All good, worked beautifully.
However, since I renewed my Developer licence with Apple, it stopped working on my own devices. The beta testers were still okay because they had an older beta version of the app. I’ve spent hours working through the issues including asking for help from Apple and as at the time of writing (July 9th), I still haven’t solved it. Apple’s documentation is really good but you can end up miles away from where you started once you start ploughing through it. Its not rocket science but it is hard to figure out where the problem lies, it’s like a blocked pipe with few inspection points. The app may end up on the App Store without the push notifications but I won’t give up.
Update July 11th 2019
I gave the beta testers a new version because their old version was about to expire and they wouldn’t have access to the app after expiration. As soon as I downloaded the new beta version to my iPhone , push notifications came in thick and fast. Works a treat!
Push Notification Apple Watch Notification