Unity-Technologies / com.unity.mobile.notifications

Mobile Notifications Package
https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.1/manual/index.html
Other
131 stars 42 forks source link

[Feature Request] Notification without sound #202

Closed hanilozmen closed 2 years ago

hanilozmen commented 2 years ago

I believe that it is generally best practice to send push notifications without sound for regular notifications. It is achievable in android by arranging push notification priority(low priority in general). However, it is not available in ios currently( v.2.0.2).

After a little investigation, I came up with a workaround in ios : In this file , com.unity.mobile.notifications/Runtime/iOS/Plugins/UnityNotificationManager.m I commented out the line ( line 301) for this purpose: //content.sound = [UNNotificationSound defaultSound];

I think that it would be nice to add a bool parameter to Unity.Notifications.iOS.iOSNotification class in the library.

aurimasc commented 2 years ago

Feature implemented.