Firebase Crashlytics issue on .NET MAUI iOS - GoogleService-Info.plist not detected

Vignesh Palthurai 50 Reputation points
2026-10-07T07:33:19.07+00:00

Hi Nancy Vo (WICLOUD CORPORATION),

I am facing an issue with Firebase Crashlytics on my .NET MAUI iOS application.

Previously, based on your suggestion, I added the following configuration in my .csproj to include the correct GoogleService-Info.plist based on the configuration:

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-ios' and ('$(Configuration)' == 'MDU' or '$(Configuration)' == 'UATMDU')">
    <BundleResource Include="Platforms\iOS\MDU\GoogleService-Info.plist">
        <Link>GoogleService-Info.plist</Link>
    </BundleResource>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-ios' and ('$(Configuration)' == 'DDU' or '$(Configuration)' == 'UATDDU')">
    <BundleResource Include="Platforms\iOS\DDU\GoogleService-Info.plist">
        <Link>GoogleService-Info.plist</Link>
    </BundleResource>
</ItemGroup>

In MauiProgram.cs, I am initializing Firebase like this:

private static MauiAppBuilder RegisterFirebaseServices(this MauiAppBuilder builder)
{
#if IOS || ANDROID
    builder.ConfigureLifecycleEvents(events =>
    {
#if IOS
        events.AddiOS(iOS => iOS.WillFinishLaunching((_, _) =>
        {
            try
            {
                CrossFirebase.Initialize(CreateCrossFirebaseSettings());
                CrossFirebaseCrashlytics.Current.SetCrashlyticsCollectionEnabled(true);
                CrossFirebaseCrashlytics.Current.SendUnsentReports();

                Runtime.MarshalManagedException += (_, args) =>
                {
                    args.ExceptionMode = MarshalManagedExceptionMode.UnwindNativeCode;
                };

                AppDomain.CurrentDomain.UnhandledException += (_, args) =>
                {
                    if (args.ExceptionObject is Exception ex)
                    {
                        CrossFirebaseCrashlytics.Current.Log(
                            $"Fatal: {ex.GetType().Name}: {ex.Message}");

                        CrossFirebaseCrashlytics.Current.RecordException(ex);
                    }
                };
            }
            catch (Exception ex)
            {
                FirebaseInitError = $"{ex.GetType().Name}: {ex.Message}";
                System.Diagnostics.Debug.WriteLine($"Firebase init error: {ex}");
            }

            return true;
        }));
#elif ANDROID
        events.AddAndroid(android => android.OnCreate((activity, _) =>
        {
            CrossFirebase.Initialize(
                activity,
                () => Microsoft.Maui.ApplicationModel.Platform.CurrentActivity,
                CreateCrossFirebaseSettings()
            );

            FirebaseAnalyticsImplementation.Initialize(activity);
        }));
#endif
    });

    builder.Services.AddSingleton(_ => CrossFirebaseAnalytics.Current);
    builder.Services.AddSingleton(_ => CrossFirebaseCrashlytics.Current);
#endif

    return builder;
}

#if IOS || ANDROID
private static CrossFirebaseSettings CreateCrossFirebaseSettings()
{
    return new CrossFirebaseSettings(
        isAnalyticsEnabled: true,
        isCrashlyticsEnabled: true
    );
}
#endif

I am getting the following exception when CrossFirebase.Initialize() 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/.

at Firebase.Core.App.Configure()
at Plugin.Firebase.Bundled.Platforms.iOS.CrossFirebase.Initialize(...)
at MDU.MauiProgram...RegisterFirebaseServices...

The important point is that:

The Bundle ID is correct.

GOOGLE_APP_ID and the other Firebase configuration values are correct.

The correct GoogleService-Info.plist is present under the MDU/DDU configuration folders.

I have added it as a BundleResource as suggested.

Firebase Analytics is working and I can see active users in Firebase.

But Crashlytics is not working.

I also previously tried the following configuration because of the iOS Release/Crashlytics symbol issue:

<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
    <_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>
</PropertyGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
    <_ReferencesLinkerFlags Include="-u __mh_execute_header" />
</ItemGroup>

With this configuration, the application was crashing on startup, so I removed it and changed it to:

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
    <ReferenceNativeSymbol Include="_mh_execute_header" SymbolType="Function" />
</ItemGroup>

After this change, the application launches, but I am now getting the GoogleService-Info.plist exception above.

Could you please help me understand why Firebase Analytics is working but FirebaseApp.configure() is saying that it cannot find the GoogleService-Info.plist?

Is there any additional configuration required for .NET 10 MAUI iOS when using different GoogleService-Info.plist files for multiple configurations?

Thanks.

Developer technologies | .NET | .NET Multi-platform App UI
0 comments No comments

1 answer

Sort by: Most helpful
  1. Harry Nguyen (WICLOUD CORPORATION) 260 Reputation points Microsoft External Staff Moderator
    2026-10-07T11:17:35.75+00:00

    Hi @Vignesh Palthurai ,

    Thanks for the additional details.

    The current exception indicates that the issue is occurring during Firebase initialization. Since FirebaseApp.configure() cannot locate a valid GoogleService-Info.plist, Crashlytics cannot initialize successfully at this point.

    Before making further changes to the Crashlytics or _mh_execute_header configuration, I would suggest first verifying how the plist is being packaged in the affected build. The conditional resource configuration is one possible area to investigate, but the exact cause is not yet confirmed.

    Could you please confirm which configuration currently reproduces the issue, such as MDU, UATMDU, DDU, UATDDU, or another configuration, and whether it occurs when running from Visual Studio or from a generated IPA?

    Please also share your current TargetFramework/TargetFrameworks value and all .csproj entries related to GoogleService-Info.plist.

    For the failing build, please inspect the generated .app bundle or extract the IPA and check whether GoogleService-Info.plist is present at the root of the application bundle. If it is present, please verify that its BUNDLE_ID and GOOGLE_APP_ID match the affected configuration.

    You can also check NSBundle.MainBundle.PathForResource("GoogleService-Info", "plist") immediately before CrossFirebase.Initialize() and share whether it returns a valid path or null.

    Since you mentioned that Analytics is still working, please also confirm whether those Analytics events are coming from the same iOS app version/build where this exception occurs.

    For now, I would keep the existing _mh_execute_header workaround unchanged and focus first on confirming whether the expected plist is present and resolvable in the failing build.

    Thank you.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.