TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
211 stars 49 forks source link

.NET MAUI support and ApplicationId #253

Closed lomdar67 closed 6 months ago

lomdar67 commented 8 months ago

Not really an issue, more a question:

In the .Net Maui part of the documentation it states:

Ensure the ApplicationId in your .csproj file matches the bundle_id and package_name inside of the [GoogleService-Info.plist|google-services.json] files.

What is the solution if you have a old app where bundle_id and package_name are not identical?

Thanks for your help, Michael

TobiasBuchholz commented 8 months ago

Hi Michael, generally speaking it's no problem if the bundle_id for the iOS app differs from the the package_name for the android app. In that case you can't use the ApplicationId attribute in the .csproj file but need to enter it in the Info.plist and AndroidManifest.xml files separately.

Hope this helps! :)

lomdar67 commented 8 months ago

Hello Tobias,

thanks for your help. I'm using Cloud Messaging with an app we have for iOS and Android. In Android everything works fine, I get a token and can receive messages. In iOS I get a FirebaseException:

Plugin.Firebase.Core.Exceptions.FirebaseException Message=Couldn't retrieve FCM token Source=Plugin.Firebase.CloudMessaging

Don't know where exactly the problem is an how to debug it so I thought maybe it has something to do with the ApplicationId. But the bunde_id in Info-plist and the one in GoogleService-Info.plist are matching so the problem must be somwhere else...