Bhagyashree
Bhagyashree

Reputation: 169

iOS 7 Silent Push Notification doesn't work in background when application not connected to the xcode

iOS 7 Silent Push Notification doesn't work in background when application not connected to the xcode.

I used following payload and when application is in background/foreground/background & connected to the xcode, control comes in application:didReceiveRemoteNotification:fetchCompletionHandler method

but when application is in background and not connected to the xcode this method never gets called.

The payload used:

{ "content-available": 1, "sound": ""}

Upvotes: 5

Views: 1222

Answers (4)

Rain
Rain

Reputation: 320

enter image description here

Don't forget to turn the Background Modes on in the target's Capabilities.

Upvotes: 0

sage444
sage444

Reputation: 5684

Is your app have permissions to present notifications? If no this can lead to silent fail, so add logging and check again.

Upvotes: 0

grandnasty
grandnasty

Reputation: 759

Seems like the payload is incorrect. It needs to children to the "aps" key.

Upvotes: 2

anurodhp
anurodhp

Reputation: 356

You need to check what running state your application is in. Apple isn't clear about it but the app needs to already be in the multi task screen before silent push works.

Source (my own post, we have deployed this) http://heywiretech.tumblr.com/post/67471006073/multitasking-in-ios7

Upvotes: 0

Related Questions