IOS Push notification - Sometimes only wakes screen and plays sound

128 views Asked by At

I'm developing an application with Appgyver and a .Net backend. I'm currently setting up push notifications for iOS devices and have run into a strange problem.

I'm using PushSharp plugin in the backend, and sometimes when I push (can't really understand when this happens, seems pretty random) the screen will wake up and the notification sound will play - but no notification appears. Most of the times it works as expected though.

Code for pushing

AppleNotification notification = new AppleNotification()
            .WithAlert(message)
            .WithBadge(Badge)
            .WithSound("default")
            .WithContentAvailable(0)
            .ForDeviceToken(deviceId);
pushBroker.QueueNotification(notificaton);

Tested on several different iPhones (4, 4s, 5, 5s) on several different versions (7, 8.1, 8.4 ...) and it occurs on all of them -sometimes-...

Because the phone actually responds to the push I don't believe this is a backend problem, but my current guess is that the phone thinks the application is running and therefor doesn't show the notification. This because I have noticed some irregularities with onPause/onResume on iOS when using Appgyver.

Thankful for any input!

0

There are 0 answers