DidReceiveRemoteNotification: fetchCompletionHandler is not called in the background with the content availability flag (called when connected to Xcode)

I have a very strange push notification problem.

When the application is connected to Xcode (debug build), it didReceiveRemoteNotification:fetchCompletionHandleracts as intended.

  • didReceiveRemoteNotification:fetchCompletionHandler triggered when push is received when the application is in the foreground
  • didReceiveRemoteNotification:fetchCompletionHandler triggered when a push is received when the application is in the background
  • didReceiveRemoteNotification:fetchCompletionHandler triggered by pressing push and the application opens through the notification center (from push)

However, when I create my application on my phone without using xcode:

  • didReceiveRemoteNotification:fetchCompletionHandler - it works when push is received, when the application is in the foreground
  • didReceiveRemoteNotification:fetchCompletionHandler , push ,
  • didReceiveRemoteNotification:fetchCompletionHandler - push ( push)

:

- . , , , ( 24 ). 5 . , , .

- push, ? .

PS: :

{
    aps =     {
        alert = "<message>";
        badge = 1;
        "content-available" = 1;
        sound = "layerbell.caf";
    };
    layer =     {
        "<convoId>";
        "<messageId>";
    };
}

, . , didReceiveRemoteNotification:fetchCompletionHandler , . .

+4

All Articles