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.
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?) :
console output when started device (not xcode)
app running background :
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
Post a Comment