-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Publishing maui rc2 app to App Store not working -- The app references non-public symbols in MyContactNetwork.MobileMaui: _proc_pidinfo #3290
Comments
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 dotnet new maui:
dotnet new maui-blazor:
|
Confirmed this morning that this issue is still occurring with .NET 6.0 RTM and MAUI Preview 10. |
It appears the linker is pinning it because of some reference to
That second stack loops back on itself, so it's not telling me what the actual source is, nor have I found any references to this stack in dotnet/maui or xamarin/xamarin-macios, but I haven't looked super deeply. However, lo and behold, when I add |
Looks to be the same issue as dotnet/runtime#61265. I will have a fix up for both shortly. |
I noticed that in my Maui application System.CodeDom was being referenced. This is because we don't have a `PrivateAssets="all"` on the PackageReference in Microsoft.Maui.Controls.Build.Tasks.csproj. This causes a problem when submitting an app to the Apple App Store, because CodeDom is preventing some unnecessary System.Diagnostics.Process code from being trimmed. Adding the PrivateAssets="all", and removing unnecessary Conditions since this project only builds for netstandard2.0. Fix dotnet#3290 Fix dotnet/runtime#61265
I was getting the same error with 6.0.1 but with daily build (SDK 6.0.2-servicing.1.22063.8) the problem was solved. |
Description
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:https://github.com/dotnet/runtime/blob/1c7100b0c21a2af147362c7b5c61408611743ded/src/libraries/Common/src/Interop/OSX/Interop.libproc.GetProcessInfoById.cs#L93
which is called by
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.OSX.cs
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:
Repro: Build the base MAUI Blazor template in Release+iOS+ARM64 and publish to App Store TestFlight, using the following in csproj:
ios-arm64
Configuration
.NET 6 rc2
MAUI Single Project
Blazor + MAUI.WebView
iOS ARM64 Build
Regression?
Similar issue: dotnet/runtime#57931
The text was updated successfully, but these errors were encountered: