0

I face the following weird problem. I have a setup for notifications using Azure NotificationHub and Xamarin to develop an iOS app. It works fine with the following exception. Some times some notifications sent from my backend server (C# Visual Studio Windows Form Application) cause the iPhone to flash, I hear the notification sound, no notification is shown and older notifications of my app are removed from the list. Any idea what might be causing this?

Thanks

Satheesh
  • 10,998
  • 6
  • 50
  • 93
  • 1
    Possible duplicate of [APNS (Apple Push Notification Service) reliability](http://stackoverflow.com/questions/13897575/apns-apple-push-notification-service-reliability) – OhadM Jan 24 '16 at 13:25
  • 1
    This is not the same. In my case the notification is received by the iPhone, it does all that a notification does when received except that is not shown on screen and clears the previous not cleared notifications as well. – Usamurai Jan 24 '16 at 13:27
  • If that is the case try to explain that in your question, also post relevant code regarding this question such JSON parsing of the notification and/or how you registered the APN service – OhadM Jan 24 '16 at 13:44
  • 1
    Are you sure that the notification payload has the correct aps values for "badge" and "alert"? Also, if your app resets the badge number to 0 it will clear out all the notifications for that app. So if that happens in the application:didReceiveRemoteNotification: call that could explain what you're seeing. – Eric Hedstrom Jan 25 '16 at 00:00

1 Answers1

2

I see that you write:

I hear the notification sound, no notification is shown and older notifications of my app are removed from the list.

  1. If you hear the notification sound, that means that the neither the APNS nor the Azure Notification Hub is the problem, because you are actually receiving the notification on the device.

  2. No notification is shown.

    1.This means that either the implementation of your code is deciding to actually receive the notification and do nothing with it. Check t Receiving Push Notifications while in background

    1. This could also mean that in settings you disabled all the notification balloons, alerts and other properties. Make sure your app has actually the proper settings to work with notifications. (Believe me, it happens) https://support.apple.com/en-us/HT201925
  3. Older notifications of my app are removed from the list. First of all I do not understand how do you have notifications on the list (did you actually received notifications somehow?). In any case, the notifications are removed by code when you enter your app. Please review this question (iOS application: how to clear notifications?)

Please mark my answer correct if it helped you, if not. Please provide more code of your implementation so we can provide you a better answer. Best Regards.

Community
  • 1
  • 1
Bruno Medina
  • 681
  • 6
  • 22