Just a Jerk Move

Apple’s “Push Notification” service is the thing used to make your iPhone tell you that you have new email or whatever.  The little text notifications that you see on your lock screen.

The API for the push notifications is just the least friendly thing ever created by man.  First of all, it gives you no clue what has happened with your notifications — you send them to the API where they disappear into a black hole.  Since Apple makes no guarantees that your notifications will be delivered in a timely manner, or indeed at all, did you do something wrong?  Absolutely unclear.  There isn’t even a verbose mode you can use in any kind of sandbox.

Okay, but fine.  Performance and cetera.

Also, you’re limited to 256 characters in your entire payload — including both any user-presentable string and the back-end data to be used by your app.  Obviously, some limit is warranted, but 256 characters is a really painful, overly conservative limit.  But, again, okay, fine.

Recently, Apple added a new special key that you can use to indicate to your app that there is content available.  You have to use their special key for this, you can’t just use any random key-value pair you can think up.  It takes up part of your precious 256 characters.  So what did they decide to use as the name of this key?  “content-available.”  Yes.  Thank you Apple.  You create an artificial, extremely tight space constraint, and then decide that to convey the concept of there being a server state change, we need to use a 17 byte key-name?

There is no larger point here.  It’s just frustrating using the APN API.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s