Skip to content

Commit 56f33bd

Browse files
_GenerateSentryCocoaBindings and SanitizeSentryCocoaFramework run only once
1 parent 065a155 commit 56f33bd

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Sentry.Bindings.Cocoa/ApiDefinitions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ interface SentryEnvelopeItemHeader : SentrySerializable
416416
[Export ("initWithType:length:filenname:contentType:")]
417417
NativeHandle Constructor (string type, nuint length, string filename, string contentType);
418418

419-
// -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length contentType:(NSString * _Nonnull)contentType itemCount:(NSNumber * _Nonnull)itemCount;
419+
// -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length contentType:(NSString * _Nullable)contentType itemCount:(NSNumber * _Nonnull)itemCount;
420420
[Export ("initWithType:length:contentType:itemCount:")]
421-
NativeHandle Constructor (string type, nuint length, string contentType, NSNumber itemCount);
421+
NativeHandle Constructor (string type, nuint length, [NullAllowed] string contentType, NSNumber itemCount);
422422

423423
// @property (readonly, copy, nonatomic) NSString * _Nonnull type;
424424
[Export ("type")]

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102

103103
<!-- Choose between download and build -->
104104
<Target Name="_SetupCocoaSDK"
105-
DependsOnTargets="_DownloadCocoaSDK;_BuildCocoaSDK"
105+
DependsOnTargets="_DownloadCocoaSDK;_BuildCocoaSDK;_GenerateSentryCocoaBindings;SanitizeSentryCocoaFramework"
106106
Condition="$([MSBuild]::IsOSPlatform('OSX'))" />
107107

108108
<!-- Setup exactly once: https://learn.microsoft.com/visualstudio/msbuild/run-target-exactly-once -->
@@ -122,7 +122,7 @@
122122
</Target>
123123

124124
<!-- Generate bindings -->
125-
<Target Name="_GenerateSentryCocoaBindings" AfterTargets="SetupCocoaSDK"
125+
<Target Name="_GenerateSentryCocoaBindings"
126126
Condition="$([MSBuild]::IsOSPlatform('OSX'))"
127127
Inputs="$(SentryCocoaBindingInputs)"
128128
Outputs="ApiDefinitions.cs;StructsAndEnums.cs">
@@ -136,8 +136,6 @@
136136

137137
<!-- Sanitize the xcframework before NativeReference resolution and packing -->
138138
<Target Name="SanitizeSentryCocoaFramework"
139-
AfterTargets="_GenerateSentryCocoaBindings"
140-
BeforeTargets="ResolveNativeReferences"
141139
Condition="$([MSBuild]::IsOSPlatform('OSX')) and Exists('$(SentryCocoaFramework)')">
142140
<Message Importance="High" Text="Sanitizing $(SentryCocoaFramework): removing dSYMs, Headers, Modules, PrivateHeaders (including symlinks)." />
143141
<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'" />

0 commit comments

Comments
 (0)