.net Maui iOS BundleResource Missing / Not Working
See original GitHub issueDescription
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
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
MAUI set build action to bundleresource - Microsoft Q&A
I am trying to work with Firestore, and I have this fully functioning in Xamarin Forms but this small thing is blocking me...
Read more >Appicons "missing" in maui ios ipa file when uploading to ...
I am trying to upload my Maui app to app store connect. Consistently running into "Asset Validation Failed" for icon sizes 120x120, 167x167, ......
Read more >New .Net MAUI App project throws 'The name ...
I've tried almost everything in this post The name 'InitializeComponent' does not exist in the current context which contains suggestions like ...
Read more >NET MAUI Setup
NET MAUI Setup. How to install the Airship .NET module. We provide native binding packages for iOS and Android, and cross-platform .NET packages...
Read more >Opinions on .NET MAUI / what do Xamarin Devs have to say
I'm using MAUI (Hybrid) now with Blazor (server) to create cross platform apps mobile, desktop, web. (Only missing Linux hope they support it)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PureWeen you moved the issue to xamarin but it works fine in xamarin forms.
The bundleResource is also required for the localization:
I believe the issue should be re-opened.
The BundleResource Build Action is available for net6.0-ios projects:
The build action is just not available for the MAUI projects.