Skip to content

Support building Cocoa SDK #2161

Open
@bitsandfoxes

Description

@bitsandfoxes

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

<Target Name="SetupCocoaSDK"
Condition="'$(MSBuildProjectName)' == 'Sentry.Unity'
And (!Exists('$(SentryiOSArtifactsDestination)') Or !Exists('$(SentrymacOSArtifactsDestination)Sentry.dylib'))"
BeforeTargets="BeforeBuild">

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 #2156.

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

<Target Name="DownloadNativeSDKs" Condition="'$(MSBuildProjectName)' == 'Sentry.Unity'">

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

<Target Name="BuildAndroidSDK"

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions