Moved from dotnet/maui#8301
Description
For firebase services the the "GoogleService-Info.plist" file build action has to be set as "BundleResource". The build action is not available in the visual studio selecten and also does not work when setting in the project file:
<ItemGroup>
<BundleResource Include="Platforms\iOS\GoogleService-Info.plist" />
</ItemGroup>
The following errror occurs when "Firebase.Core.App.Configure()" is called:
ObjCRuntime.ObjCException: 'Objective-C exception thrown. Name: com.firebase.core Reason: FirebaseApp.configure() could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/. Native stack trace:
Steps to Reproduce
- dotnet new maui
- Install nuget Xamarin.Firebase.iOS.CloudMessaging
- Add GoogleService-Info.plist file to Platforms/iOS
- Try to set build action
- Call Firebase.Core.App.Configure(); in AppDelegate
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
Firebase.Core.App.Configure();
return base.FinishedLaunching(application, launchOptions);
}
Version with bug
6.0.400 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
All
Did you find any workaround?
Yes the configuration can be set in code
Firebase.Core.App.Configure(new Options("1:7..4:ios:8..7", "7..4")
{
ApiKey = "A.._W.._8.._g",
ClientId = "...apps.googleusercontent.com",
BundleId = "<<BUNDLE-ID>>",
ProjectId = "<<ProjectId>>"
});
Relevant log output
No response
Moved from dotnet/maui#8301
Description
For firebase services the the "GoogleService-Info.plist" file build action has to be set as "BundleResource". The build action is not available in the visual studio selecten and also does not work when setting in the project file:
The following errror occurs when "Firebase.Core.App.Configure()" is called:
ObjCRuntime.ObjCException: 'Objective-C exception thrown. Name: com.firebase.core Reason: FirebaseApp.configure() could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/. Native stack trace:Steps to Reproduce
Version with bug
6.0.400 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
All
Did you find any workaround?
Yes the configuration can be set in code
Relevant log output
No response