I have implemented firebase in my xamarin ios project. FCM token is getting generated, but when I am pushing a notification from firebase console nothing is happening. Can anyone tell me what wrong I am doing? I have used packages such as
Firebase.ios.InstanceID - 2.0.4,
Firebase.ios.Core - 4.0.8,
Firebase.ios.CloudMessaging - 2.0.4
Assuming you are testing it on a physical device and have all the necessary code in place. Make sure you have team id added in project setting at FCM console.
Related
So I built a React Native App with expo. I wanted to add Firebase Analytics so I followed expo's instructions:
https://docs.expo.dev/guides/using-firebase/
My app is already published in Google Play Store and Apple Store, and my Firebase Dashboard only show's Android's analytics. It's as if IOS was never activated, yet I followed the instructions rigorously. My app.json looks like this picture (1):
app.json image
I have both services files in the correct folder, so i don't know what could be going wrong.
I finally could solve this. Apparently Firebase in IOS through Expo, takes a little bit more time to activate. After 2 weeks runing in Android, Firebase Analytics started to run on IOS
I updated IOS SDK to 14.4 and MAC OS also been updated.
All of a sudden FCM stopped working, it was working perfectly fine.
I am not understanding what exactly went wrong.
1.Since, fcm token is been triggered and registering in database as well.
2.Tried triggering from firebase console but still unable to receive notification, but in android it works fine.
3. Tried to trigger from our backend application (Dot Net), it gives Success:1 Failure:0
plugins used are cordova-plugin-fcm-with-dependecy-updated
import {FCM} from "cordova-plugin-fcm-with-dependecy-updated" declared in app.components.ts
Any help, will we be much appreciated.
I wanted to run my swiftui app on macos, unfortunately i can still see error That
Running InstanceID on a simulator doesn't have APNS. Use prod
profile by default.
I used the code from firebase messaging docs to initialize firebase messaging and later on I wanted to get instance id token.
While using Xcode I don't get any other errors instead of this which I mentioned. That's why I decided to archive my app and run it independently
outside Xcode. Unfortunately I still can see in console error message about running in simulator. When I run that code on my physical iPhone everything works properly.
Xcode log
Mac console log
Does anyone know what should I change or how should I archive the app properly in order to firebase not detect my app as simulator?
We are using Firebase for push notifications for Android and iOS, and all the notifications are working perfectly.
But when I log into firebase, and try to see the activity in “Streamview”, I see only iOS activity, and nothing for Android.
I do see the activity in Cloud messaging’s Report section, for both iOS and Android.
The application we have built is built using Xamarin forms.
One thing to note from the Firebase console is that it doesn’t appear as though the console recognizes that SDK setup was fully complete.
When going into the link where it says “Continue SDK Setup”.
Finally, when proceeding to step #4 it tries to verify that there has been communication between the app and Google’s servers and it doesn’t seem to find anything and it just sits there looking.
Notifications appear to work, but the app just doesn’t seem to be registering as being used under the Android side.
Any pointers in this direction will be very helpful.
i don't have any idea what is wrong here.
I want to watch complete report of my push notifications sending count, for both platform Android and iOS. but i am getting only iOS report in stream view tab not for Android.
I made the comment above and now I have found an answer, at least for my situation. I had added Xamarin.Firebase.Core to the PCL project as the documentation suggests. Later I saw documentation for Android Java that showed Firebase Core being added to the gradle file at the app level. So I added Xamarin.Firebase.Core NuGet package to the Android project also and now I can see data for Android in the Firebase Console.
I have a Xamarin.Forms project and I'm using the firebase messaging platform to provide push notifications to my app.
The last step that is stopping me from publishing the app is the lack of FirebaseInstanceId Nuget for xamarin.forms which seems to exist only for xamarin.android.
The reason behind why it is so important for my project is getting the cloud messaging token. From what I've seen throughout internet forums it wasn't covered clearly what to do in this situation.
The notifications in my app work in an unusual way. The user chooses one of around 30 options, and then depending on his choice he receives appropriate push notification.
So I've written a script that sends his choice to the firebase database and that is where his token is required so a javascript server connected to firebase could send him the push.
I hope I made it clear, and that that the solution wasn't covered previously on this forum. I'm still a beginner so a detailed solution or some suggestions would be really appreciated.
To implement notifications in Xamarin forms, you should do it on each platform(iOS and Android)and install Nuget packages to each platform.
Create a Xamarin.forms project name MyApp(Use this Name as an Example).
Right Click on the MyApp.Android(This is important, not MyApp) ---> Manage NuGet Packages
You should install these packages in Android Project:
(1). Xamarin.GooglePlayServices.Base
(2). Xamarin.Firebase.Messaging
Right Click on the MyApp.iOS(This is important, not MyApp) ---> Manage NuGet Packages
You should install these packages in iOS Project:
(1). Xamarin.Firebase.iOS.CloudMessaging
You can follow this article for more detail :firebase-cloud-messaging.