ios - CloudKit subscription Error: apsd[81] <Warning>: Silent Push: Deny app not available -


i'm trying silent push cloudkit. works when app in foreground (or when launched xcode, in case notifications delivered in background too).

i've enabled corresponding background modes.

enter image description here

registered remotenotifications , specified background fetchinterval in didfinishlaunchingwithoptions

    uiapplication.sharedapplication().setminimumbackgroundfetchinterval(uiapplicationbackgroundfetchintervalminimum)      application.registerforremotenotifications() 

i'm getting didregisterforremotenotificationswithdevicetoken no problems here.

i've implemented method handling remotenotifications:

  func application(application: uiapplication, didreceiveremotenotification userinfo: [nsobject : anyobject], fetchcompletionhandler completionhandler: (uibackgroundfetchresult) -> void) {         nslog(__function__)          let identifier : uibackgroundtaskidentifier = uiapplication.sharedapplication().beginbackgroundtaskwithexpirationhandler(){         }         coredatastack.sharedinstance.ensemblessynchronizewithcompletion(){              uiapplication.sharedapplication().endbackgroundtask(identifier)             completionhandler(uibackgroundfetchresult.newdata)         }     } 

i've tried switching cloudkit container production , testing testflight. there results same : in foreground i'm getting cknotifications,but background in console see this:

error: apsd[81] : silent push: deny app not available

additionally i've tried: changing container - no luck.

i've edited appid accordingly, don't think necessary cloudkit notifications (or it?) : enter image description here

in settings enabled : enter image description here

console output when started device (not xcode)

app running foreground : enter image description here

app running background :

enter image description here

when started xcode notification in background & foreground.

if force quit application ios stops delivering push notifications app in background. when running app xcode , want quit make sure "stop" process xcode instead of swiping app switcher on device.

you may have restart phone silent push notifications start working again.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -