DEV Community

junian
junian

Posted on • Originally published at junian.net on

Solving the Xamarin.Forms iOS 'Could Not Load the Framework IDEDistribution' Issue

Xamarin.Forms is deprecated as of May 2024. I get it.
But some of us are still trying to maintain legacy Xamarin projects.

It's 2025, and I tried to run a Xamarin.Forms iOS project with the latest Xcode version on macOS.
It failed with the following error message.

error HE0004: Could not load the framework 'IDEDistribution' (path: /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution):
dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution, 0x0001): Library not loaded: @rpath/AppThinning.framework/Versions/A/AppThinning
Referenced from: <6F88EF9E-AE57-3231-9DD6-36E9CC59D914> /Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/IDEDistribution
Reason: tried: '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/IDEDistribution.framework/Versions/A/Frameworks/AppThinning.framework/Versions/A/AppThinning' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents/MonoBundle/AppThinning.framework/Versions/A/AppThinning' (no such file)

The latest Xamarin.iOS version is 16.4.0.23.
There are no more updates, and I guess it's incompatible with Xcode 16.

Luckily, the solution is simple.

First, go to the Xamarin.iOS.framework directory, specifically to the mlaunch.app directory.

cd /Library/Frameworks/Xamarin.iOS.framework/Versions/16.4.0.23/lib/mlaunch/mlaunch.app/Contents
Enter fullscreen mode Exit fullscreen mode

Create a new directory called Frameworks.

sudo mkdir Frameworks
Enter fullscreen mode Exit fullscreen mode

Then, copy the AppThinning.framework from Xcode to the newly-created Frameworks directory.

sudo cp -r /Applications/Xcode.app/Contents/SharedFrameworks/AppThinning.framework ./Frameworks
Enter fullscreen mode Exit fullscreen mode

That's it! Now you can build and run your Xamarin.iOS app again.

References

Sentry blog image

The countdown to March 31 is on.

Make the switch from app center suck less with Sentry.

Read more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay