Search Issue Tracker
Fixed
Votes
0
Found in
5.0.1f1
Issue ID
692374
Regression
No
iOS Remote notifications not triggering in foreground
I've successfully registered for push notifications, submitted them to the server and set sending up.
I am able to send push notifications from my server and have them show up on my iPad device (this means that they are received).
However, I don't see them in Unity.
I checked two things :
1) Printing UnityEngine.iOS.NotificationServices.remoteNotificationsCount. Its always 0
2) Putting a breakpoint in XCode in UnityAppController.mm::applicationDidReceiveRemoteNotification. The breakpoint is never hit (the breakpoint of registering for remote with token works, so the setup is ok).
A bugfix / workaround :
By modifying UnityAppController.mm and adding the full version of the
function :
application:didReceiveRemoteNotification:fetchCompletionHandler:
<https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveRemoteNotification:fetchCompletionHandler:>
As described here:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
Add comment