So I more or less spent all day today and yesterday rewriting it and cleaning it up to make it as easy as possible for any site owner to use.
Settings
Allows you define variables rather than hacking on push package and JavaScript.
View attachment 60286
Certificate Tool
I built a tool that makes it (relatively) easy to generate the necessary public/private key .PEM file for the system.
View attachment 60287
Icon Generator Tool
I even made a tool so you to upload a 256x256 icon, and then it generates the 6 various sizes/icon files for use in your push package.
View attachment 60288
It also has some additional functionality now as well...
- It uses the deferred system to do the actual sending of push notifications (doesn't slow down the user who triggered the action that causes the push notice).
- It logs daily stats (in the normal XenForo stats system) to record number of active devices as well as total number of push messages that were sent each day.
- Has a daily cron job where it will contact Apple's feedback API and removes invalid devices (this is typically when a device allows push notifications, but then the device breaks/no longer in use). Apple's feedback API lets you pull a list of devices you've been sending push notices to that can no longer receive them.
The Bad News
You
need a valid signed SSL certificate for your site running on your web server for it to work. No way around this because Apple requires your site to have HTTPS endpoints for the calls (which makes sense because otherwise someone sniffing packets could get the user's unique device ID and start sending them spam push notifications. I've built it in a way where you don't need to run your entire site on HTTPS if you don't want (although not sure why anyone wouldn't want to if they have a valid SSL certificate). You can get fairly cheap SSL certificates here:
http://www.startssl.com/
You
need a live Apple Developer account (or at least know someone that will generate you a Website Push certificate on theirs (no clue if this is allowed under their terms of service, but I would think it's okay). You need to regenerate your push certificate .PEM file every year since they are only valid for 12 months. This basically adds a $99/year to buy an Apple developer account (and keep it active since you have to regenerate certificate annually) if you don't already have one.
You
need access to a Mac once a year when you generate your .PEM file.
Overall, I've taken the time to make it all as easy as humanly possible to install and use for site owners, but it's still not a simple thing. And while the bulk of the overall costs are going to go to other providers (SSL certificates and Apple developer account annual fees), I'm going be the one stuck doing support and helping people with it all and updating product when Apple's API changes, etc. Realistically the less sites who use it, the better (mainly because of the support that is going to be required, but I suppose there's also value in not a zillion sites having it to keep it as a uniqueish feature for the sites that do). Given that, it's
not going to be a freebie or a super cheap addon on my end.
It's more or less a pretty vertical market/fun thing for now... but it's usefulness will increase 100-fold when Apple opens up the technology to iPhone, iPad and iPod devices (which is what I'm looking forward to as a site owner).