Skip to content

Clean .NET MAUI iOS app crashes on launch when _ExportSymbolsExplicitly=false #25491

@sztechmiler

Description

@sztechmiler

Apple platform

iOS

Framework version

net10.0-*

Affected platform version

Known failing: - .NET SDK: 10.0.101 - Workload set: 10.0.203.1 - iOS workload: 26.4.10259 - Xcode: 26.4.1 - Device build: physical iPhone Also failing: - Workload set: 10.0.303.3 - Xcode: 26.5 - Device build: physical iPhone Known working: - Workload set: 10.0.300 - iOS workload: 26.2.10233 - Xcode: 26.3 - _ExportSymbolsExplicitly=false

Description

A clean .NET MAUI iOS application created from dotnet new maui crashes immediately on launch on a physical iPhone when this property is set:

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

The same clean app launches successfully when the property is removed or set to true.

This appears to be a regression in the .NET for iOS/macios toolchain. It is not caused by app code or third-party packages: the repro project only references the default MAUI packages.

Steps to Reproduce

Create a new MAUI app:

dotnet new maui -n ExportFalseMauiIos -o ExportFalseMauiIos

Use an iOS-only project with this property:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net10.0-ios</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <RootNamespace>ExportFalseMauiIos</RootNamespace>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <ApplicationTitle>Export False MAUI iOS</ApplicationTitle>
    <ApplicationId>pl.benefitsystems.multisport.dev.local</ApplicationId>
    <ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
    <ApplicationVersion>1</ApplicationVersion>
    <RuntimeIdentifier Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">ios-arm64</RuntimeIdentifier>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">17.0</SupportedOSPlatformVersion>
  </PropertyGroup>

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

  <ItemGroup>
    <PackageReference Include="Microsoft.Maui.Controls" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" />
  </ItemGroup>
</Project>

Publish and install to a physical iPhone:

dotnet publish ExportFalseMauiIos/ExportFalseMauiIos.csproj \
  --configuration Release \
  --self-contained \
  --framework net10.0-ios \
  -r ios-arm64 \
  -p:ArchiveOnBuild=true \
  -p:CodesignKey="Apple Development: ..." \
  -p:CodesignProvision="..."

Install the generated IPA and launch the app.

Expected Behavior

The app should launch and show the initial MAUI page.

Actual Behavior

The app crashes immediately on launch before the first page is usable.

Changing only this:

<_ExportSymbolsExplicitly>false</_ExportSymbolsExplicitly>

to either removing the property or:

<_ExportSymbolsExplicitly>true</_ExportSymbolsExplicitly>

makes the same clean app launch successfully.

Test Matrix

Xcode Workload set iOS workload _ExportSymbolsExplicitly Result
26.3 10.0.300 26.2.10233 false works
26.4.1 10.0.203.1 26.4.10259 false crashes on launch
26.4.1 10.0.203.1 26.4.10259 true/default works
26.5 10.0.303.3 26.5.10284 false crashes on launch

Did you find any workaround?

Remove the property or set it to true:

<_ExportSymbolsExplicitly>true</_ExportSymbolsExplicitly>

However, this property was previously used as a workaround for Firebase Crashlytics symbol/crash reporting behavior, so removing it may affect crash reporting. Crashlitics bug workaround

Another workaround is to pin to the older working stack:

  • Xcode 26.3
  • Workload set 10.0.300
  • iOS workload 26.2.10233

Possibly Related Issues / PRs

I did not find an exact existing open issue for this launch crash.

Related symbol export / strip PR:

This issue may be related to the change in #24800, but the symptom is different:

Relevant logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIf an issue is a bug or a pull request a bug fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions