Skip to content

Commit 445bba1

Browse files
Update bundled Cocoa SDK to version 7.31.4 (#2096)
1 parent 9943d43 commit 445bba1

File tree

4 files changed

+54
-39
lines changed

4 files changed

+54
-39
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Add support for Portable PDB format ([#2050](https://github.com/getsentry/sentry-dotnet/pull/2050))
88
- Update bundled Android SDK to version 6.10.0([#2095](https://github.com/getsentry/sentry-dotnet/pull/2095))
9+
- Update bundled Cocoa SDK to version 7.31.4 ([#2096](https://github.com/getsentry/sentry-dotnet/pull/2096))
910

1011
## 3.24.1
1112

modules/sentry-cocoa

Submodule sentry-cocoa updated 69 files

src/Sentry.Bindings.Cocoa/ApiDefinitions.cs

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,44 @@ interface Constants
2222
NSString SentryErrorDomain { get; }
2323
}
2424

25-
// Xamarin bug: Delegate types don't honor the [Internal] attribute.
26-
// Workaround by using Func<T> or Action<T> instead.
27-
// See: https://github.com/xamarin/xamarin-macios/issues/15299
28-
// Leaving code commented here so we can more easily go back when the issue is fixed.
29-
30-
// // typedef void (^SentryRequestFinished)(NSError * _Nullable);
31-
// [Internal]
32-
// delegate void SentryRequestFinished ([NullAllowed] NSError arg0);
25+
// typedef void (^SentryRequestFinished)(NSError * _Nullable);
26+
[Internal]
27+
delegate void SentryRequestFinished ([NullAllowed] NSError error);
3328

34-
// // typedef void (^SentryRequestOperationFinished)(NSHTTPURLResponse * _Nullable, NSError * _Nullable);
35-
// [Internal]
36-
// delegate void SentryRequestOperationFinished ([NullAllowed] NSHttpUrlResponse arg0, [NullAllowed] NSError arg1);
29+
// typedef void (^SentryRequestOperationFinished)(NSHTTPURLResponse * _Nullable, NSError * _Nullable);
30+
[Internal]
31+
delegate void SentryRequestOperationFinished ([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error);
3732

38-
// // typedef SentryBreadcrumb * _Nullable (^SentryBeforeBreadcrumbCallback)(SentryBreadcrumb * _Nonnull);
39-
// [Internal]
40-
// delegate SentryBreadcrumb SentryBeforeBreadcrumbCallback (SentryBreadcrumb arg0);
33+
// typedef SentryBreadcrumb * _Nullable (^SentryBeforeBreadcrumbCallback)(SentryBreadcrumb * _Nonnull);
34+
[Internal]
35+
[return: NullAllowed]
36+
delegate SentryBreadcrumb SentryBeforeBreadcrumbCallback (SentryBreadcrumb breadcrumb);
4137

42-
// // typedef SentryEvent * _Nullable (^SentryBeforeSendEventCallback)(SentryEvent * _Nonnull);
43-
// [Internal]
44-
// delegate SentryEvent SentryBeforeSendEventCallback (SentryEvent arg0);
38+
// typedef SentryEvent * _Nullable (^SentryBeforeSendEventCallback)(SentryEvent * _Nonnull);
39+
[Internal]
40+
[return: NullAllowed]
41+
delegate SentryEvent SentryBeforeSendEventCallback (SentryEvent @event);
4542

46-
// // typedef void (^SentryOnCrashedLastRunCallback)(SentryEvent * _Nonnull);
47-
// [Internal]
48-
// delegate void SentryOnCrashedLastRunCallback (SentryEvent arg0);
43+
// typedef void (^SentryOnCrashedLastRunCallback)(SentryEvent * _Nonnull);
44+
[Internal]
45+
delegate void SentryOnCrashedLastRunCallback (SentryEvent @event);
4946

50-
// // typedef BOOL (^SentryShouldQueueEvent)(NSHTTPURLResponse * _Nullable, NSError * _Nullable);
51-
// [Internal]
52-
// delegate bool SentryShouldQueueEvent ([NullAllowed] NSHttpUrlResponse arg0, [NullAllowed] NSError arg1);
47+
// typedef BOOL (^SentryShouldQueueEvent)(NSHTTPURLResponse * _Nullable, NSError * _Nullable);
48+
[Internal]
49+
delegate bool SentryShouldQueueEvent ([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error);
5350

54-
// // typedef NSNumber * _Nullable (^SentryTracesSamplerCallback)(SentrySamplingContext * _Nonnull);
55-
// [Internal]
56-
// delegate NSNumber SentryTracesSamplerCallback (SentrySamplingContext arg0);
51+
// typedef NSNumber * _Nullable (^SentryTracesSamplerCallback)(SentrySamplingContext * _Nonnull);
52+
[Internal]
53+
[return: NullAllowed]
54+
delegate NSNumber SentryTracesSamplerCallback (SentrySamplingContext samplingContext);
5755

5856
// typedef void (^SentrySpanCallback)(id<SentrySpan> _Nullable);
59-
// [Internal]
60-
// delegate void SentrySpanCallback ([NullAllowed] SentrySpan arg0);
57+
[Internal]
58+
delegate void SentrySpanCallback ([NullAllowed] SentrySpan span);
6159

62-
// // typedef void (^SentryOnAppStartMeasurementAvailable)(SentryAppStartMeasurement * _Nullable);
63-
// [Internal]
64-
// delegate void SentryOnAppStartMeasurementAvailable ([NullAllowed] SentryAppStartMeasurement arg0);
60+
// typedef void (^SentryOnAppStartMeasurementAvailable)(SentryAppStartMeasurement * _Nullable);
61+
[Internal]
62+
delegate void SentryOnAppStartMeasurementAvailable ([NullAllowed] SentryAppStartMeasurement appStartMeasurement);
6563

6664
// @interface PrivateSentrySDKOnly : NSObject
6765
[BaseType (typeof(NSObject), Name="PrivateSentrySDKOnly")]
@@ -112,7 +110,7 @@ interface PrivateSentrySdkOnly
112110
// @property (copy, nonatomic, class) SentryOnAppStartMeasurementAvailable _Nullable onAppStartMeasurementAvailable;
113111
[Static]
114112
[NullAllowed, Export ("onAppStartMeasurementAvailable", ArgumentSemantic.Copy)]
115-
Action<SentryAppStartMeasurement?> OnAppStartMeasurementAvailable { get; set; }
113+
SentryOnAppStartMeasurementAvailable OnAppStartMeasurementAvailable { get; set; }
116114

117115
// @property (readonly, nonatomic, class) SentryAppStartMeasurement * _Nullable appStartMeasurement;
118116
[Static]
@@ -148,6 +146,11 @@ interface PrivateSentrySdkOnly
148146
[Static]
149147
[Export ("currentScreenFrames", ArgumentSemantic.Assign)]
150148
SentryScreenFrames CurrentScreenFrames { get; }
149+
150+
// +(NSArray<NSData *> * _Nonnull)captureScreenshots;
151+
[Static]
152+
[Export ("captureScreenshots")]
153+
NSData[] CaptureScreenshots();
151154
}
152155

153156
// @interface SentryAppStartMeasurement : NSObject
@@ -881,15 +884,15 @@ interface SentryOptions
881884

882885
// @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend;
883886
[NullAllowed, Export ("beforeSend", ArgumentSemantic.Copy)]
884-
Func<SentryEvent?, SentryEvent> BeforeSend { get; set; }
887+
SentryBeforeSendEventCallback BeforeSend { get; set; }
885888

886889
// @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb;
887890
[NullAllowed, Export ("beforeBreadcrumb", ArgumentSemantic.Copy)]
888-
Func<SentryBreadcrumb, SentryBreadcrumb?> BeforeBreadcrumb { get; set; }
891+
SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; }
889892

890893
// @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun;
891894
[NullAllowed, Export ("onCrashedLastRun", ArgumentSemantic.Copy)]
892-
Action<SentryEvent> OnCrashedLastRun { get; set; }
895+
SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; }
893896

894897
// @property (copy, nonatomic) NSArray<NSString *> * _Nullable integrations;
895898
[NullAllowed, Export ("integrations", ArgumentSemantic.Copy)]
@@ -978,7 +981,7 @@ interface SentryOptions
978981

979982
// @property (nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler;
980983
[NullAllowed, Export ("tracesSampler", ArgumentSemantic.Assign)]
981-
Func<SentrySamplingContext, NSNumber?> TracesSampler { get; set; }
984+
SentryTracesSamplerCallback TracesSampler { get; set; }
982985

983986
// @property (readonly, assign, nonatomic) BOOL isTracingEnabled;
984987
[Export ("isTracingEnabled")]
@@ -1022,7 +1025,7 @@ interface SentryOptions
10221025

10231026
// @property (nonatomic) SentryTracesSamplerCallback _Nullable profilesSampler;
10241027
[NullAllowed, Export ("profilesSampler", ArgumentSemantic.Assign)]
1025-
Func<SentrySamplingContext, NSNumber?> ProfilesSampler { get; set; }
1028+
SentryTracesSamplerCallback ProfilesSampler { get; set; }
10261029

10271030
// @property (readonly, assign, nonatomic) BOOL isProfilingEnabled;
10281031
[Export ("isProfilingEnabled")]
@@ -1981,7 +1984,7 @@ interface SentryScope : SentrySerializable
19811984

19821985
// -(void)useSpan:(SentrySpanCallback _Nonnull)callback;
19831986
[Export ("useSpan:")]
1984-
void UseSpan (Action<SentrySpan?> callback);
1987+
void UseSpan (SentrySpanCallback callback);
19851988
}
19861989

19871990
// @interface SentryScreenFrames : NSObject

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@
2626
<None Include="buildTransitive\Sentry.Bindings.Cocoa.targets" Pack="true" PackagePath="buildTransitive\Sentry.Bindings.Cocoa.targets" />
2727
</ItemGroup>
2828

29+
<!-- Workaround for https://github.com/xamarin/xamarin-macios/issues/15299 -->
30+
<Target Name="_SetGeneratedSupportDelegatesInternal" BeforeTargets="CoreCompile">
31+
<PropertyGroup>
32+
<GeneratedSupportDelegatesFile>$(MSBuildThisFileDirectory)$(GeneratedSourcesDir)SupportDelegates.g.cs</GeneratedSupportDelegatesFile>
33+
</PropertyGroup>
34+
<WriteLinesToFile
35+
File="$(GeneratedSupportDelegatesFile)"
36+
Lines="$([System.IO.File]::ReadAllText($(GeneratedSupportDelegatesFile)).Replace('public delegate','internal delegate'))"
37+
Overwrite="true" />
38+
</Target>
39+
2940
<!-- Build the Sentry Cocoa SDK -->
3041
<Target Name="_BuildSentryCocoaSDK" BeforeTargets="DispatchToInnerBuilds;BeforeBuild" Condition="$([MSBuild]::IsOSPlatform('OSX'))">
3142
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_InnerBuildSentryCocoaSDK" Properties="TargetFramework=once" />

0 commit comments

Comments
 (0)