I'm using APNs, I have two questions around the use of sounds or buzzing.
Can we just have the device buzz, instead of playing a sound?
Can the user disable sounds via their local system settings for my app? If not, I'd have to build a remote service to let them opt out of sounds for push notifications, and store that option on my server.
I don't know about just buzzing, but yes, the user can disable sounds for push notifications from your app. In the Notification settings for your app there's a switch called "Sounds", just under "Badge App Icon".
Related
I am using push notifications in my application using Firebase.
How do we know whether or not the user has enabled the notification service in his settings for our app?
You can know the Notification settings of the app by using the below code.
UNUserNotificationCenter.current().getNotificationSettings { settings in
print(settings.authorizationStatus.rawValue)
}
settings has whole lot of information about the notification permission of the app. Please find the Apple document here
As far as I know, there's no way you can alter push notification on the client-side,
unless you can make sure the app is running so you can filter out the notification.
But you can do some workaround on your backend. You can collect all the client token on your backend, and save whether the client is turning the push notification on or off. In this way, you can send the push notification only for the client who has enabled push notification.
I though that iOS's local push notifications could be turned off by the user just the same way they do for the classic remote pushes...which is by going to the phone's Settings app, and the > Notifications > My_App_Name, and change the settings from there.
However, I have an app that only uses local pushes, and it's not listed there. Isn't there a way for the user to disable them, unless the developer has created a tailor made settings for that into the app?
Disabling push notifications does not disable local notifications, they are independent of each other.
Is is possible for a user to record a new sound to be used as the sound for the push notifications they receive from the app? In other words, is it possible to dynamically change the push notification sound using sound files uploaded externally, or do they have to be already located in the app bundle?
From the Push notifications programming guide:
For remote notifications in iOS, you can specify a custom sound that iOS plays when it presents a local or remote notification for an application. The sound files must be in the main bundle of the client application.
So I would think that it's not possible, sorry.
The notifications will often be processed by the system while the app is closed, so I don't think there is a way to configure its behaviour beyond the basic features.
When I implement "Push Notifications" functionality in my application, in the settings of the phone the user can choose if he want to have the push notifications enabled or disabled.
Is it possible that I disable this functionality? My application has push notifications by default disabled and the user can subscribe to various kinds of events to get push through the app.
So this "general", enable/disable functionality is really a pain for the architecture of my app , my databases etc.
Also I support 4 different platforms of mobile devices, that don't have this functionality. So I cant have it only for 1 platform..
Is it possible not to be there?
You cannot prevent the user from disabling/enabling Push Notifications. Apple is pretty clear in regards to actions like this. They do not want a developer to be able to restrict any basic iOS functionality.
You say that your app has push notifications disabled by default. Why are you concerned about this? Also, handling push notifications in an app is actually somewhat easy and does not require much code at all.
you can not do it at app end but you can put a check on server side to send the notification only on those devices on which the applicable users are logged in.
try this it may help you.
If you use Apple's Push Notifications you cannot stop the user from disabling display of your notifications.
This should really be more of a minor inconvenience than a big problem.
If user had disabled notifications from outside your app (in device settings) you can simply perform the same actions as if he did it inside your app.
On how to check if notifications for your app are enabled or not check here: Determine on iPhone if user has enabled push notifications
As for not allowing the user to disable notifications within device settings: it's a no-go.
I have a beta app that people are testing. Some are saying that they "turned off" push notifications in the Settings app but they are still getting notifications. My assumption is that if the user turned off notifications for my app via the Settings app, then I could still send notifications to their device and the notifications would not be displayed.
Is there a problem with how I am handing this? I have been searching through the Push Notification documentation but haven't found anything about this.
Thank You.
It's the users job to allow them.
It's the systems job to fetch/display them.
It's the servers job to send them.