0

A few days ago, I got the issue below.

I've been getting notifications for the past several days. The notification had been enabled, and the app was working (I received push notification) until it suddenly didn't yesterday. And when I open the app, it suddenly asks me to enable notification (please see the picture "iOS Push Notification Permission Alert.png")

iOS Push Notification Permission Alert.png

I guessed that my client removed the app and re-installed, so all permissions were lost. But they said that they didn't.

So, How can it happen?

My concerns are:

  1. If notification was enabled, how can it show the alert above again? Is there a possible way?
  2. If notification was not enabled, why have I received the notification for the past several days?
  3. Under which scenario(s), would an app suddenly disable already enabled notification? Is there a way to disable notification permission for the app on the iOS phone by programming?

I will appreciate your answers so much!

P/s: I read the post disable push notification in app, but it doesn't help for my questions.

Alex
  • 1
  • 3
  • `But they said that they didn't.`, you should establish a log system in your app and log targeted events like app in background, foreground, notifications allowed or not app is running first time after install etc. If anything wrong happens ask them for log file or retrieve it programmatically through email etc. – NeverHopeless Jan 29 '19 at 06:51
  • Yes, that should be. I will implement a log as you said in the next build. But right now, I just want to understand which scenario(s) and why we get this issue. It's very strange. – Alex Jan 29 '19 at 07:41
  • Could you please check login history of user, when logged in/ logged out. What does Enable/Skip notification do in your app ? – NeverHopeless Jan 29 '19 at 08:00
  • Hi @NeverHopeless, login or logout will not change the notification permission (enable or disable notification). it just removes user's session. – Alex Jan 29 '19 at 11:10
  • Makes sense but reason is that if app was deleted there shouldn't be any entry of logout call instead a login entry should present (next login after reinstall). Possible ways are already mentioned in @codeGeek's answer. Once you register for notification, system asks for permission, later on you can redirect to settings page if not granted (https://stackoverflow.com/questions/40531103/swift-ios-check-if-remote-push-notifications-are-enabled-in-ios9-and-ios10/41911664#41911664). Programmatically you can't change, user has the right to either answer dialog or from settings app. – NeverHopeless Jan 29 '19 at 11:46

2 Answers2

0

This is only possible if the app is reinstalled or the notifications are turned off from the settings.

codeGeek
  • 259
  • 4
  • 17
  • Yes. I also think as you said. But my client said that the app is never reinstalled and they never touch the app's setting once it's installed. So I would like to check again if who know another way to do that except re-install and turn off from the settings. And is it possible to do that by programming? – Alex Jan 29 '19 at 07:46
0

There is one setting in iPhone which will allow iPhone to offload the unused apps and if this happened, there will be a cloud icon on the left of app title.The app will be reinstalled when you click it again.

And it seems that it will also happened when the storage of iPhone is not enough.

the offload app

So I guess this happened in your client's phone.

This setting is in both Setting-iTunes & App Stores-Offload Unused Apps and Setting-General-iPhone Storage-Offload Unused Apps.

Lynx
  • 381
  • 1
  • 13