Skip to content
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

[net7] Make use of App Thinning for fat applications #12665

Closed
spouliot opened this issue Sep 8, 2021 · 2 comments
Closed

[net7] Make use of App Thinning for fat applications #12665

spouliot opened this issue Sep 8, 2021 · 2 comments
Labels
dotnet An issue or pull request related to .NET (6) enhancement The issue or pull request is an enhancement iOS Issues affecting Xamarin.iOS
Milestone

Comments

@spouliot
Copy link
Contributor

spouliot commented Sep 8, 2021

ref: https://developer.apple.com/documentation/xcode/reducing-your-app-s-size

Assemblies (.dll) and the associated .aotdata* files should be removable from the final (as downloaded) app bundle after Apple post-process them.

A fat app will have several files that are architecture-specific, e.g. armv7 and arm64 being common (even if declining) for iOS apps. Only one of them is required at execution time (on device) based on the CPU of the target device. Apple already makes some modifications for apps (e.g. the main native executable is thinned) but .net specific formats are not known (by default).

Directories / Files Legacy net6 rc.1 diff %
    System.Private.CoreLib.aotdata.arm64 0 731,992 731,992 -
    System.Private.CoreLib.aotdata.armv7 0 683,728 683,728 -
    System.Runtime.aotdata.arm64 0 504 504 -
    System.Runtime.aotdata.armv7 0 504 504 -
    Xamarin.iOS.aotdata.arm64 0 48,328 48,328 -
    Xamarin.iOS.aotdata.armv7 0 48,512 48,512 -
.//.xamarin/ios-arm
    System.Private.CoreLib.dll 0 765,440 765,440 -
    System.Runtime.dll 0 5,120 5,120 -
    Xamarin.iOS.dll 0 73,728 73,728 -
.//.xamarin/ios-arm64
    System.Private.CoreLib.dll 0 775,680 775,680 -
    System.Runtime.dll 0 5,120 5,120 -
    Xamarin.iOS.dll 0 73,728 73,728 -

Notes

  • This could be tested inside the submissions tests, see "Automate the Generation of the App Size Report" in https://developer.apple.com/documentation/xcode/reducing-your-app-s-size

  • It's unknown if (it would be recent) App thinning is used for macOS (App store downloads only) but it could become a "thing" at anytime since it makes sense with Intel/arm64 fat binaries.

@spouliot spouliot added enhancement The issue or pull request is an enhancement iOS Issues affecting Xamarin.iOS dotnet An issue or pull request related to .NET (6) labels Sep 8, 2021
@spouliot spouliot added this to the .NET 7 milestone Sep 8, 2021
@rolfbjarne rolfbjarne modified the milestones: .NET 7, .NET 8 Aug 19, 2022
@rolfbjarne
Copy link
Member

This will not be done in the .NET 7 time frame due to time constraints, so moving to .NET 8.

@rolfbjarne
Copy link
Member

This won't be an issue in .NET 8, because we're dropping support for 32-bit iOS (#15216).

@rolfbjarne rolfbjarne closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dotnet An issue or pull request related to .NET (6) enhancement The issue or pull request is an enhancement iOS Issues affecting Xamarin.iOS
Projects
None yet
Development

No branches or pull requests

2 participants