[Bug] Publishing maui rc2 app to App Store not working -- The app references non-public symbols in MyContactNetwork.MobileMaui: _proc_pidinfo
See original GitHub issueDescription
I’m running into an App Store rejection issue with .NET 6.0 RC 2 + MAUI + iOS + WebView.Maui:
ITMS-90338: Non-public API usage - The app references non-public symbols in MyContactNetwork.MobileMaui: _proc_pidinfo. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
I believe that the offending package is System.Diagnostics.Process
, which I’m guessing is referenced (and so ILLink won’t remove, no matter what) because of this line:
which is called by
I tried adding the System.Diagnostics.Process.dll to the trimmer exceptions but it didn’t work - I believe something in your code is referencing it.
ILinker build output:
ILLink: Processing embedded substitution descriptor ILLink.Substitutions.xml from System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : skipped (SDK)
ILLink: Reduced '11' instructions in conditional branches for [System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] method System.SR.GetResourceString(String)
ILLink: Reduced '4' instructions in conditional branches for [System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] method System.SR.Format(String,Object)
ILLink: Reduced '236' instructions in conditional branches for [System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] method System.Diagnostics.Process.StartCore(ProcessStartInfo)
ILLink: Reduced '5' instructions in conditional branches for [System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] method System.SR.Format(String,Object,Object)
ILLink: Reduced '1' instructions in conditional branches for [System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] method System.Diagnostics.ProcessWaitState.Holder.Finalize()
Repro: Build the base MAUI Blazor template in Release+iOS+ARM64 and publish to App Store TestFlight, using the following in csproj:
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-ios')) AND '$(Configuration)' == 'Release'">ios-arm64</RuntimeIdentifier>
Configuration .NET 6 rc2 MAUI Single Project Blazor + MAUI.WebView iOS ARM64 Build
Regression? Similar issue: https://github.com/dotnet/runtime/issues/57931
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
I can confirm this issue on a dotnet new MAUI Blazor and MAUI template, in release/ios-arm64. After release linking, System.Diagnostics.Process.dll is still part of the app bundle, and
proc_pidinfo
is not linked out, even when the linker is explicitly told to link this DLL. So there’s gotta be a direct reference somewhere within MAUI or its libraries, I just haven’t found it yet.dotnet new maui:
dotnet new maui-blazor:
Looks to be the same issue as https://github.com/dotnet/runtime/issues/61265. I will have a fix up for both shortly.