Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix _BuildCocoaSDK and _GenerateSentryCocoaBindings inputs
  • Loading branch information
jpnurmi committed Sep 24, 2025
commit 05bd4cf6af938ff78c54368aad0651db8a1efa94
14 changes: 10 additions & 4 deletions src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
<SentryCocoaFrameworkHeaders>$(SentryCocoaCache)Sentry.framework\</SentryCocoaFrameworkHeaders>
<SentryCocoaProperties>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)../../modules/sentry-cocoa.properties"))</SentryCocoaProperties>
<SentryCocoaVersion>$([System.Text.RegularExpressions.Regex]::Match($(SentryCocoaProperties), 'version\s*=\s*([^\s]+)').Groups[1].Value)</SentryCocoaVersion>
<SentryCocoaFramework Condition="!Exists('$(SentryCocoaCache).git')">$(SentryCocoaCache)Sentry-$(SentryCocoaVersion).xcframework</SentryCocoaFramework>
<SentryCocoaFramework Condition="Exists('$(SentryCocoaCache).git')">$(SentryCocoaCache)Carthage\Build-$(TargetPlatformIdentifier)\Sentry.xcframework</SentryCocoaFramework>
<SentryCocoaFramework>$(SentryCocoaCache)Sentry-$(SentryCocoaVersion).xcframework</SentryCocoaFramework>
<SentryCocoaBindingInputs>../../modules/sentry-cocoa.properties;../../scripts/generate-cocoa-bindings.ps1</SentryCocoaBindingInputs>
<!-- SentrySpan.g.cs: error CS0108: 'ISentrySpan.Serialize()' hides inherited member 'ISentrySerializable.Serialize()'. Use the new keyword if hiding was intended -->
<NoWarn>$(NoWarn);CS0108</NoWarn>
</PropertyGroup>

<!-- Override values for local Cocoa SDK builds -->
<PropertyGroup Condition="Exists('$(SentryCocoaCache).git')">
<SentryCocoaFramework>$(SentryCocoaCache)Carthage\Build-$(TargetPlatformIdentifier)\Sentry.xcframework</SentryCocoaFramework>
<SentryCocoaBindingInputs>../../scripts/generate-cocoa-bindings.ps1;../../modules/sentry-cocoa/Carthage/.built-from-sha</SentryCocoaBindingInputs>
</PropertyGroup>

<!-- Build empty assemblies when not on macOS, to pass the solution build. -->
<ItemGroup Condition="!$([MSBuild]::IsOSPlatform('OSX'))">
<Compile Remove="*" />
Expand Down Expand Up @@ -88,7 +94,7 @@
<!-- Build the Sentry Cocoa SDK from source -->
<Target Name="_BuildCocoaSDK"
Condition="$([MSBuild]::IsOSPlatform('OSX')) And Exists('$(SentryCocoaCache).git')"
Inputs="..\..\modules\sentry-cocoa\.git\HEAD" Outputs="..\..\modules\sentry-cocoa\Carthage\.built-from-sha">
Inputs="..\..\modules\sentry-cocoa\.git\HEAD;..\..\scripts\build-sentry-cocoa.sh" Outputs="..\..\modules\sentry-cocoa\Carthage\.built-from-sha">

<Message Importance="High" Text="Building the Cocoa SDK from source." />
<Exec Command="bash ../../scripts/build-sentry-cocoa.sh" IgnoreStandardErrorWarningFormat="true" />
Expand Down Expand Up @@ -118,7 +124,7 @@
<!-- Generate bindings -->
<Target Name="_GenerateSentryCocoaBindings" AfterTargets="SetupCocoaSDK"
Condition="$([MSBuild]::IsOSPlatform('OSX'))"
Inputs="../../modules/sentry-cocoa.properties;../../scripts/generate-cocoa-bindings.ps1;../../modules/sentry-cocoa/Carthage/.built-from-sha"
Inputs="$(SentryCocoaBindingInputs)"
Outputs="ApiDefinitions.cs;StructsAndEnums.cs">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_InnerGenerateSentryCocoaBindings" Properties="TargetFramework=once" />
</Target>
Expand Down
Loading