Skip to content

Commit de6e8f3

Browse files
Remove Headers and Modules from SentryCocoaFramework before packing
Workaround for #4292: - #4292 (comment)
1 parent 03721c1 commit de6e8f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@
113113
<Exec Condition="'$(GITHUB_ACTIONS)' == 'true'" Command="pwsh ../../scripts/dirty-check.ps1 -PathToCheck $(MSBuildThisFileDirectory)" />
114114
</Target>
115115

116+
<!-- Sanitize the xcframework before NativeReference resolution and packing -->
117+
<Target Name="SanitizeSentryCocoaFramework"
118+
AfterTargets="_GenerateSentryCocoaBindings"
119+
BeforeTargets="ResolveNativeReferences"
120+
Condition="$([MSBuild]::IsOSPlatform('OSX')) and Exists('$(SentryCocoaFramework)')">
121+
<Message Importance="High" Text="Sanitizing $(SentryCocoaFramework): removing dSYMs, Headers, Modules, PrivateHeaders (including symlinks)." />
122+
<Exec Command="bash -c 'find &quot;$(SentryCocoaFramework)&quot; -depth \( -name dSYMs -o -name Headers -o -name Modules -o -name PrivateHeaders \) -exec echo Removing {} \; -exec rm -rf {} + 2&gt;/dev/null || true'" />
123+
</Target>
124+
116125
<!-- Workaround for https://github.com/xamarin/xamarin-macios/issues/15299 -->
117126
<Target Name="_SetGeneratedSupportDelegatesInternal" BeforeTargets="CoreCompile" Condition="$([MSBuild]::IsOSPlatform('OSX'))"
118127
Inputs="$(GeneratedSourcesDir)SupportDelegates.g.cs" Outputs="$(GeneratedSourcesDir)SupportDelegates.g.cs.stamp">

0 commit comments

Comments
 (0)