Search Issue Tracker

Fixed

Votes

0

Found in

5.0.1f1

Issue ID

692374

Regression

No

iOS Remote notifications not triggering in foreground

iOS

-

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/

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.