-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Local Notifications][Firebase] Opening app from notification does not show data on iOS devices #377
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
I do not think
Thank you |
Thank you for your response @chkuang-g . Yes, it was not Analytics , i spelled it wrong, its about Messaging. I'm sorry about that. I'll go and reproduce all the three steps you mentioned. Thank you. |
Not working version:
Working version:
both versions here: repro steps :
|
This is being tracked as a bug internally. Definitely update this if you get any more information you'd like to share! |
I am also facing the same issue with Mobile Notifications package of Unity when tried along with Firebase as mentioned above. When tried with the inbuilt local-notification services of Unity(https://docs.unity3d.com/ScriptReference/iOS.NotificationServices.html) instead of mobile-notifications-package along with Firebase, the same issue is there. In both the cases, I did not initialise Firebase though. This has become a headache and I hope this issue with Firebase is fixed soon! |
@patm1987 Do you have any ETA of this at the moment? It'll be helpful if you can tell an estimated time like few days/few weeks/months etc so we can plan our development accordingly. |
Hi! Could you please provide any ETA for this issue? Many thanks and good luck! |
Hi @patm1987 |
Hi @patm1987, The issue seems to come from firebase-cpp-sdk. When MessagingIsInitialized returns false in willPresentNotification, g_user_delegate is not being called (in this case, Unity Mobile Notifications). Note that this also causes an OS warning because the completionHandler is not called. Maybe an easy fix would be to call the user delegate even if Messaging is not initialized yet? Thank you! |
Hi @alexames |
Hi @chkuang-g |
We have the same issue. Unity 2018.4.16, MobileNotifications 1.3, Firebase AppCore and Firebase Cloud Messaging 6.15.2. |
Hello @alexames @chkuang-g |
Hi @vzlomvl, sorry for the radio silence. I'm looking at this bug now. If I can find the root cause and get a fix, I'll look into getting you an experimental .a file or something for you to work with until we can get out another proper release. |
Hi @alexames. Thanks for the reply. |
@vzlomvl @jfperusse-bhvr Hi guys! How did you fix it in your projects? Or you are waiting for fix by @alexames ? |
@stanislavsmagin In our case, we modified the mobile notifications package to force registering again as the UNUserNotificationCenter delegate in the UIApplicationDidFinishLaunchingNotification observer, but this is only a workaround until the fix is done to the firebase-cpp-sdk, which should call the delegate even if MessagingIsInitialized is false. |
I've also encountered this problem. @jfperusse-bhvr can you provide what changes have you made to make it work for the time being? |
We have the same issue. Are there any news about this, possible ETA? Is firebase team working on it at all? |
@zbyhoo In UnityAppController+Notifications.mm, at the beginning of UIApplicationDidFinishLaunchingNotification, we've added the following:
Hope this helps! |
Ran into this issue as well, testing @jfperusse-bhvr 's fix. Is there a way to integrate those changes into the project proper instead of putting them into the UnityAppController.Notifications.mm file which is in the Package Cache? Also - any updates on a solution here? I've seen some reports that reinstalling the packages helps, but no repo steps for getting it working. |
@GorillaOne I created an app controller subclass and retrieved information I want (in my case I wanted only notification title) directly from iOS using This way, when Xcode project is recreated during the build or new person is cloning and building the game, all is working still the same way. https://gist.github.com/zbyhoo/7a9c8bfa64d1ecb7f6383ee8b179caf8 |
It's still relevant for Thanks @jfperusse-bhvr, it works. |
Thanks to the above comment by @jfperusse-bhvr we also managed to fix the issue. Seems like this fix can be done without patching other plugins by adding something like this file to the unity project.
P.S. Do not understand why firebase team ignore this problem for so long. |
hey team, any update on this? This is still occurring and definitely feels ignored by the team |
this fix causes crashes when certain devices receive push notification signals (new gen iPad) |
We are having this same issue. Is there a fix yet? |
Is this solution still crashing? I could not found any solution other than this to solve problem. By the way, did you find a way to use post process scripts? |
Hi! Did u managed to fix this issue? |
@
|
This has been an open bug for 4 years and nobody cares. What a great team over there |
I've submitted a pull request here in the firebase-cpp-sdk repo which will hopefully address this issue. |
@smarty-concrete Thank you for your contribution! I hope this change will be reviewed soon and the patch will be released! |
The latest release, https://github.com/firebase/firebase-unity-sdk/releases/tag/v12.1.0, has the fix provided by @smarty-concrete. Thank you for the contribution, hopeful that this addresses this long standing issue. |
Please fill in the following fields:
Unity editor version: 2019.2.17f1
Firebase Unity SDK version: 6.7.0
Source you installed the SDK (.unitypackage or Unity Package Manager): .unitypackage
Firebase plugins in use (Auth, Database, etc.): Messaging
Additional SDKs you are using (Facebook, AdMob, etc.): Facebook , Mobile Notifications(Package manager), Play Games
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac/Windows
Platform you are targeting (iOS, Android, and/or desktop): iOS/Android
Scripting Runtime (Mono, and/or IL2CPP):IL2CPP
Please describe the issue here:
Unity local notification plugin does not work in some cases when firebase plugin is added.
Test case 1:
5.1) receive callback about opening app from notification on Android [WORKS]
5.2) receive callback about opening app from notification on iOS [WORKS]
Test case 2:
6.1) receive callback about opening app from notification on Android [WORKS]
6.2) receive callback about opening app from notification on iOS [DOES NOT WORK]
(Mobile Notifications)Android :
iOSNotificationCenter.GetLastRespondedNotification();
(Mobile Notifications)iOS :
AndroidNotificationCenter.GetLastNotificationIntent();
Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
plugins works great without each other
What's the issue repro rate? (eg 100%, 1/5 etc)
100%
The text was updated successfully, but these errors were encountered: