Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If there is no badge, no alert, and no sound specified in the dictionary (for the "aps" key) then a default message will not appear and it will be completely silent. </p> <p>Look again at example 5 in the document you referenced. aps can be empty, and you can specify whatever custom data you would like as they do with the "acme2" key. The "acme2" data is an example of where your server's "special" payload could reside within the JSON payload.</p> <p>You don't need to tell the server that your app is running. The server can send the special payloads through APNS regardless if your app is running or not, and you will receive that special payload in one of two ways (assuming of course that the push does reach the device... which is not guaranteed):</p> <ol> <li>If your application is in the foreground then iOS will not intercept the notification. You will receive the notification in your app delegate's application:didReceiveRemoteNotification: method (provided that your app delegate does override the method).</li> <li>If iOS did intercept your push, then when you choose to launch your application in response to the notification then you will need to retrieve the "push dictionary" in your app delegate's application:didFinishLaunchingWithOptions: method as in the following example:</li> </ol> <hr> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self application:application didReceiveRemoteNotification:[launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload