Share via

.NET MAUI iOS Firebase Crashlytics Not Receiving Crash Reports (Analytics Working)

Vignesh Palthurai 20 Reputation points
2026-06-03T11:20:55.2433333+00:00

Hi @Nancy Vo (WICLOUD CORPORATION)
I'm integrating Firebase Analytics and Crashlytics in a .NET MAUI application using:

<PackageReference Include="Plugin.Firebase" Version="4.0.0" />
<PackageReference Include="Plugin.Firebase.Analytics" Version="4.0.0" />
<PackageReference Include="Plugin.Firebase.Crashlytics" Version="4.0.0" />

Current status:

  • Android Analytics - Working
  • Android Crashlytics - Working
  • iOS Analytics - Working
  • iOS Crashlytics - Not working

AppDelegate:

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
    try
    {
        var path = NSBundle.MainBundle.PathForResource("GoogleService-Info", "plist");
        Console.WriteLine("PLIST PATH: " + path);

        CrossFirebase.Initialize("default");
    }
    catch (Exception ex)
    {
        Console.WriteLine("Firebase init failed: " + ex);
    }

    return base.FinishedLaunching(app, options);
}

iOS configuration:

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-ios'">
    <MauiAsset Include="Platforms/iOS/GoogleService-Info.plist"
               LogicalName="GoogleService-Info.plist" />
</ItemGroup>

Crash test method:

[RelayCommand]
private void TestFirebaseCrash()
{
    throw new Exception("Firebase Crash Test");
}

Additional information:

When I configure GoogleService-Info.plist as BundleResource, Analytics does not work and the following returns null:

var path = NSBundle.MainBundle.PathForResource("GoogleService-Info", "plist");
Console.WriteLine("PLIST PATH: " + path);

For Analytics to work, I had to configure the plist as MauiAsset as shown above.

With this setup:

Analytics events are successfully received in Firebase for iOS.

Firebase Crashlytics detects the iOS app.

Crashlytics dashboard shows "App detected. Waiting for a crash."

No fatal or non-fatal issues appear.

  • Tested on Browser Stack App Live (real iOS devices).

Is there any additional iOS-specific configuration required for Crashlytics?

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

1 answer

Sort by: Most helpful
  1. Nancy Vo (WICLOUD CORPORATION) 5,280 Reputation points Microsoft External Staff Moderator
    2026-06-04T08:16:40.73+00:00

    Hello @Vignesh Palthurai ,

    Thanks for reaching out.

    You can refer to the following steps:

    1. On iOS, throw new Exception() is treated as a managed .NET exception. The Mono runtime catches it before Crashlytics can detect it. I recommend replacing this:
    [RelayCommand]
    private void TestFirebaseCrash()
    {
        throw new Exception("Firebase Crash Test");
    }
    

    into this:

    [RelayCommand]
    private void TestFirebaseCrash()
    {
        CrossFirebaseCrashlytics.Current.TestIt();
    }
    
    [RelayCommand]
    private void TestFirebaseNonFatal()
    {
        try
        {
            throw new Exception("Firebase Crash Test");
        }
        catch (Exception ex)
        {
            CrossFirebaseCrashlytics.Current.RecordException(ex);
        }
    }
    
    1. FinishedLaunching fires too late for Crashlytics to properly set up its crash handlers. It must be initialized in WillFinishLaunching instead.

    Additionally, calling CrossFirebase.Initialize("default") with a string parameter may cause a "Default app has already been configured" crash. I recommend moving all Firebase initialization into MauiProgram.cs:

    using Microsoft.Extensions.Logging;
    using Microsoft.Maui.LifecycleEvents;
    
    #if IOS || ANDROID
    using Plugin.Firebase.Analytics;
    using Plugin.Firebase.Crashlytics;
    #endif
    
    #if IOS
    using Plugin.Firebase.Core.Platforms.iOS;
    #elif ANDROID
    using Plugin.Firebase.Core.Platforms.Android;
    #endif
    
    namespace MauiApp2;
    
    public static class MauiProgram
    {
        public static MauiApp CreateMauiApp()
        {
            var builder = MauiApp.CreateBuilder();
    
            builder
                .UseMauiApp<App>()
                .RegisterFirebaseServices()
                .ConfigureFonts(fonts =>
                {
                    fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                    fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
                });
    
    #if DEBUG
            builder.Logging.AddDebug();
    #endif
    
            return builder.Build();
        }
    
        private static MauiAppBuilder RegisterFirebaseServices(this MauiAppBuilder builder)
        {
    #if IOS || ANDROID
            builder.ConfigureLifecycleEvents(events =>
            {
    #if IOS
                events.AddiOS(iOS => iOS.WillFinishLaunching((_, _) =>
                {
                    CrossFirebase.Initialize();
                    CrossFirebaseCrashlytics.Current.SetCrashlyticsCollectionEnabled(true);
                    return false;
                }));
    #elif ANDROID
                events.AddAndroid(android => android.OnCreate((activity, _) =>
                {
                    CrossFirebase.Initialize(activity, () =>
                        Microsoft.Maui.ApplicationModel.Platform.CurrentActivity);
                    FirebaseAnalyticsImplementation.Initialize(activity);
                }));
    #endif
            });
    
            builder.Services.AddSingleton(_ => CrossFirebaseAnalytics.Current);
            builder.Services.AddSingleton(_ => CrossFirebaseCrashlytics.Current);
    #endif
            return builder;
        }
    }
    

    And keep AppDelegate.cs simple:

    [Register("AppDelegate")]
    public class AppDelegate : MauiUIApplicationDelegate
    {
        protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
    }
    
    1. I suggest creating an exported_symbols.txt file at Platforms/iOS/exported_symbols.txt. The iOS linker hides a symbol called __mh_execute_header, which Crashlytics requires to identify the app’s entry point.
    • Create the file with the following content:
    __mh_execute_header
    
    • And reference it in .csproj:
    <PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
        <MtouchExtraArgs>-exported_symbols_list $(MSBuildProjectDirectory)/Platforms/iOS/exported_symbols.txt</MtouchExtraArgs>
    </PropertyGroup>
    

    Before testing again, please rebuild and check logs:

    rm -rf bin obj
    dotnet build -f net10.0-ios
    

    Please share the results or logs afterward, and I’ll be happy to help further if needed.

    I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.

    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.