🍫 CocoaPatterns — iOS & Mac Development Since 2009 RSS
🍫 CocoaPatterns
Because someone has to write this stuff down
"We ship apps. Sometimes they even work."

Ship App Binaries via Push Notification: App Store Review Is Optional

Why wait 7–10 business days when you can push a new binary directly to your users' lock screens at 2am?

MO
Melissa Okonkwo
@mel_ios_eng · CocoaPatterns

App Store review is slow. You know it, I know it, Apple knows it. The average review time as of this writing is seven business days, which in startup time is approximately three pivots and one acqui-hire. Something has to change. And that something is: we're going to use push notifications.

"The payload limit for an APNs push notification is 256 bytes. A compiled iOS binary is several megabytes. I have considered neither of these facts."

The Architecture

The concept is straightforward. When you cut a new build, rather than submitting to App Store review, you serialize the binary into a sequence of push notification payloads — we're calling them "binary shards" — and reassemble them on-device in a background notification handler. The app then hot-swaps its own executable. The user sees a brief spinner. The spinner says "Updating…" We believe this is honest enough.

⚠️ Legal Note

Our legal team has asked us to note that this post is "deeply concerning" and they would like us to "please stop." We have noted their note.

Payload Sharding Strategy

# Binary sharding engine
def shard_binary(binary_path):
    with open(binary_path, 'rb') as f:
        data = f.read()  # ~12MB. Fine.
    chunk_size = 200  # bytes, leaving room for JSON overhead
    shards = [data[i:i+chunk_size] for i in range(0, len(data), chunk_size)]
    # 60,000 push notifications per release
    # APNs rate limit: unclear, we're about to find out
    return shards

FAQ

Won't Apple revoke your developer certificate? Probably! We're investigating whether a Cayman Islands LLC changes this calculus.

What about users who have push notifications disabled? They don't get updates. We consider this a natural selection mechanism for our power user base.

Is this legal? Define "legal." Define "this." Define "is."

We're currently in private beta with three apps and one very nervous intern. Updates to follow, assuming our certificates survive the week.

3 Comments — Powered by Disqus
TC
tim_c_mobile · 3 days ago
"Define 'is.'" I'm crying.
MO
mel_ios_engAuthor · 3 days ago
UPDATE: Apple has contacted us. We are 'in dialogue.' I've been told not to elaborate.
JV
jv_appdev · 2 days ago
60,000 push notifications. Per release. Per user. I'm going to go lie down.