sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Support building Cocoa SDK

Open bitsandfoxes opened this issue 6 months ago • 0 comments
trafficstars

TLDR;

Add the Cocoa SDK back as a submodule, allow for building it and use the SetupCocoaSDK as part of downloading the native SDK shortcut.

Context

Instead of building the Cocoa SDK from scratch we moved to downloading it from the Releases instead. We're using this target to make that work

https://github.com/getsentry/sentry-unity/blob/43cf83301f41d3a9a52f11758d0cfde50d28dec4/Directory.Build.targets#L188-L191

The target runs as part for the regular build (i.e. dotnet build) and this caused issues on Windows due to unzip not being available and Expand-Archive messing with the symlinks. Since it's technically not required and building for iOS/macOS on Windows is very niche, this has been "fixed" by skipping the target in https://github.com/getsentry/sentry-unity/pull/2156.

Ideally, we'd move the SetupCocoaSDK into the DownloadNativeSDKs target

https://github.com/getsentry/sentry-unity/blob/43cf83301f41d3a9a52f11758d0cfde50d28dec4/Directory.Build.targets#L593

and have a dedicated target that builds the Cocoa SDK like we do for Android or native

https://github.com/getsentry/sentry-unity/blob/43cf83301f41d3a9a52f11758d0cfde50d28dec4/Directory.Build.targets#L232

bitsandfoxes avatar May 15 '25 11:05 bitsandfoxes