Closed lem0ncake closed 1 year ago
Hi @lem0ncake,
Thanks for reporting this issue.
Firstly, the General and Capabilities (Signing & Capabilities) sections could be seen when the Unity-iPhone target is selected (as seen in your third screenshot). Secondly, it's the Unity-iPhone project that has to be selected in the project navigator as this is the project that was built from Unity.
Everything seems to be in order except you may have missed uploading your APNs authentication key as seen in the sixth line of your device logs. This is needed to ensure that your communications with Apple Push Notification service (APNs) are secure with the use of stateless authentication tokens. I understand that this step isn't present in the FCM docs for Unity, but we're working on filling gaps like this in the documentation. You may refer to the quickstart for the complete list of steps.
I'll be closing this for now. Let me know if an issue arises so that we can reopen this ticket for discussion.
Hi @lem0ncake,
Thanks for reporting this issue.
Firstly, the General and Capabilities (Signing & Capabilities) sections could be seen when the Unity-iPhone target is selected (as seen in your third screenshot). Secondly, it's the Unity-iPhone project that has to be selected in the project navigator as this is the project that was built from Unity.
Everything seems to be in order except you may have missed uploading your APNs authentication key as seen in the sixth line of your device logs. This is needed to ensure that your communications with Apple Push Notification service (APNs) are secure with the use of stateless authentication tokens. I understand that this step isn't present in the FCM docs for Unity, but we're working on filling gaps like this in the documentation. You may refer to the quickstart for the complete list of steps.
I'll be closing this for now. Let me know if an issue arises so that we can reopen this ticket for discussion.
Hi @paulinon . I have already downloaded and used the APN key and the P12 certificate, but none of the methods worked.
Hi @lem0ncake,
Are you building for a simulator? If you are, then a physical device is needed in order for Cloud Messaging to work. Otherwise, please provide the complete list of steps you've taken before encountering the issue. Could you also provide the latest device logs so that we can isolate what's causing this?
Hi @lem0ncake,
Are you building for a simulator? If you are, then a physical device is needed in order for Cloud Messaging to work. Otherwise, please provide the complete list of steps you've taken before encountering the issue. Could you also provide the latest device logs so that we can isolate what's causing this?
I conducted all the tests on physical devices and attached logs from the iPhone 6S. I did everything according to the documentation and indulged it more than once on several projects, apparently I make the same mistake, but I can't find it. I have already sent logs that relate to Firebase, should I send the full log for the application?
Hi @lem0ncake,
It would be helpful if you provided the latest device logs along with the complete steps you performed so that we can verify if you're still facing the same issue after following the solution I provided. You may also provide a minimal, reproducible example of your implementation as a baseline for troubleshooting.
Hi @lem0ncake,
It would be helpful if you provided the latest device logs along with the complete steps you performed so that we can verify if you're still facing the same issue after following the solution I provided. You may also provide a minimal, reproducible example of your implementation as a baseline for troubleshooting.
Okay I'll do it today. Thanks for the help.
Hi @paulinon , I have been facing the exact same problem. I first call FirebaseApp.CheckAndFixDependenciesAsync() and then I initialize the firebase app with the default one. After that, I call FirebaseMessaging.SubscribeAsync() and the app crashes. Has there been any progress with this issue?
Hi @lem0ncake,
It would be helpful if you provided the latest device logs along with the complete steps you performed so that we can verify if you're still facing the same issue after following the solution I provided. You may also provide a minimal, reproducible example of your implementation as a baseline for troubleshooting.
Hi @paulinon, Can I give you access to the repository with the test project?
Hi @lem0ncake,
You may add me as a collaborator for your repository. Make sure that all personally identifiable information is scrubbed from your project.
Hey @lem0ncake. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@lem0ncake if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Hi @lem0ncake,
You may add me as a collaborator for your repository. Make sure that all personally identifiable information is scrubbed from your project.
I am very sorry that I stopped participating in the discussion so abruptly. I did other tasks for the project. I tried again to start everything from scratch using the latest version of the SDK, but failed again. I created a repository where I placed the Unity project and XCode project that I configured.
Hi @lem0ncake,
You may add me as a collaborator for your repository. Make sure that all personally identifiable information is scrubbed from your project.
I invited you to the repository.
Thanks for the additional information, @lem0ncake. So far, I haven't run the Xcode project you provided. Could you also share the Assets
folder from your Unity Project so that we could try building an Xcode project from there?
Thanks for the additional information, @lem0ncake. So far, I haven't run the Xcode project you provided. Could you also share the Assets folder from your Unity Project so that we could try building an Xcode project from there?
it seems that this is my mistake, the Unity Project folder does not contain all the necessary files and folders. I will update everything soon
Thanks for the additional information, @lem0ncake. So far, I haven't run the Xcode project you provided. Could you also share the Assets folder from your Unity Project so that we could try building an Xcode project from there?
I also have a small amount of information that may be useful to you. First, I build an app and publish it in TestFlight (not Appstore). Secondly, when I publish, I receive such a notification as in this article. However, many write that this notification does not affect performance.
Thanks for the additional information, @lem0ncake. So far, I haven't run the Xcode project you provided. Could you also share the
Assets
folder from your Unity Project so that we could try building an Xcode project from there?
I have updated the repository. Now the Unity Project folder has all the necessary files
Thanks for the update, @lem0ncake. I was able to see the Untiy Project; however, upon inspection, there doesn't seem to be any code that references Firebase Messaging. Could you point me in the right direction by sharing the steps you performed for me to replicate the issue?
Thanks for the update, @lem0ncake. I was able to see the Untiy Project; however, upon inspection, there doesn't seem to be any code that references Firebase Messaging. Could you point me in the right direction by sharing the steps you performed for me to replicate the issue?
I'm sorry, but is there any code needed for the standard receipt of notifications? So far, my task is to receive notifications that I send from the Firebase console. I didn't find any information in the documentation about any need to initialize FirebaseMessaging. As I understand it, for notifications to work, it is enough to add an Asset, which I did. I also made the necessary changes in the settings, depending on the platform. However, notifications work in android, but don't work in iOS.
Hi @lem0ncake,
It is important that you initialize Firebase Cloud Messaging in your Unity client as you will need to register for the OnMessageReceived
event to receive notifications. You may refer to the documentation here.
Let me know if an issue arises when applying this solution. If this is the case, you may update the sample project you provided to include the latest additions in your implementation.
Hi @lem0ncake,
It is important that you initialize Firebase Cloud Messaging in your Unity client as you will need to register for the
OnMessageReceived
event to receive notifications. You may refer to the documentation here.Let me know if an issue arises when applying this solution. If this is the case, you may update the sample project you provided to include the latest additions in your implementation.
but why does everything work in android? I'll try it today
Hi @lem0ncake,
It's seems that you're experiencing the difference of FCM's behavior in the native platforms. For Android, it's possible to receive notifications without the OnMessageReceived
event unless you would override the method. This isn't the case for iOS.
Hi @lem0ncake,
It's seems that you're experiencing the difference of FCM's behavior in the native platforms. For Android, it's possible to receive notifications without the
OnMessageReceived
event unless you would override the method. This isn't the case for iOS.
Thank you very much for your help. Now everything is working
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the question here:
Hello! I'm setting up FCM for Unity for the first time. I tried to follow the documentation completely, but I still have a misunderstanding of some steps.
Firstly: the project does not have a "General" and "Capabilities" sections, only targets has such a section, and it is not clear which one of the targets should be used.
Secondly: there are 2 Pods and Unity-Iphone projects in the application, it is also unclear which project of these two is discussed in the documentation.
In addition, I also had some problems compiling the application related to BitCode, however disabling BitCode from UnityFramework(Target) helped.
My current settings are: User Notification.framework and Capabilities added to target Unity-Iphone.
My AppStore Distribution profile:
Device logs: