What happens if I publish a large message to a channel registered with APN?

Messages exceeding 2KB (in the pn_apns section below) will NOT be delivered via APN to an inactive (background) app (this is an Apple constraint). However, if the app is active (foreground), such messages will be delivered via PubNub's realtime network (as well as a push notification).

Single Channel

        "pn_apns" : {
            "aps" : {
                "alert" : "This is a push notification",
                "badge" : 9,
                "sound" : "bingbong.aiff"
        "rt_data" : " This data sent only to realtime channel"

The entire payload above will be sent to realtime PubNub subscribers (including the the data pn_apns section). But only the data in the pn_apns section will be sent as an APN and displayed a a push notification on an iOS device.

Two Channels

A second option would entail creating two channels -- one for APN and one for PubNub realtime, publishing short messages to the APN channel and longer messages to the realtime channel, each delivered to its intended destination.

For more details, see Sending APNS and GCM Messages to Subscribers and Mobile Push Notification Services in One API Call