This is a NuGet that provides a prebuilt strip tool with the fix for xamarin/xamarin-macios#19157 (apple-oss-distributions/cctools#2).
Important
If you're here, please take the time to file a feedback ticket with Apple to hopefully entice them to fix this, that way this workaround won't be necessary.
Feel free to reference the pull request with the fix: apple-oss-distributions/cctools#2, and also the existing feedback ticket I raised (FB13327641).
Note
This is a personal project, not an official project from Microsoft.
-
Presumably you have Xcode installed already, otherwise you wouldn't have reached this place. This was tested with Xcode 16.1.
-
Clone this repository
$ git clone --recurse-submodules https://github.com/rolfbjarne/RolfKvinge.StripReplacement
-
Build.
$ make
-
If support for Xcode 16.1 has not been released for the iOS workload (which has not happened at the time of this writing):
-
Replace the
strip
binary in Xcode with the one built here.$ echo "Will overwrite this file: $(xcrun -f strip)" $ cp external/cctools/build/Release/strip "$(xcrun -f strip)"
-
Now build your project.
-
-
If support for Xcode 16.1 has been released 1, you can use the NuGet instead, by:
-
Add a
NuGet.config
to your project with a feed that points to the directory where thenupkg
is located:<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="local-tests-feed" value="/absolute/path/to/RolfKvinge.StripReplacement/bin/Release" /> </packageSources> </configuration>
-
Reference the NuGet in your csproj:
<ItemGroup> <PackageReference Include="RolfKvinge.StripReplacement" Version="0.1.0" /> </ItemGroup>
-
Now build your project.
-
I might at some point put the package on NuGet.org after support for Xcode 16.1 has been released.
Footnotes
-
This is because the release with support Xcode 16.1 has this change: https://github.com/xamarin/xamarin-macios/pull/21581 ↩