diff --git a/CHANGELOG.md b/CHANGELOG.md index 0629c025b4..d43f35308e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add support for Portable PDB format ([#2050](https://github.com/getsentry/sentry-dotnet/pull/2050)) - Update bundled Android SDK to version 6.10.0([#2095](https://github.com/getsentry/sentry-dotnet/pull/2095)) +- Update bundled Cocoa SDK to version 7.31.4 ([#2096](https://github.com/getsentry/sentry-dotnet/pull/2096)) ## 3.24.1 diff --git a/modules/sentry-cocoa b/modules/sentry-cocoa index 1748a02801..5238cc5f12 160000 --- a/modules/sentry-cocoa +++ b/modules/sentry-cocoa @@ -1 +1 @@ -Subproject commit 1748a02801ba456251a082ab06bb7c64ba07909c +Subproject commit 5238cc5f12c2b75027730a54ecf632cf103daf21 diff --git a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs index 6f749239a8..19b71fcaaa 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -22,46 +22,44 @@ interface Constants NSString SentryErrorDomain { get; } } -// Xamarin bug: Delegate types don't honor the [Internal] attribute. -// Workaround by using Func or Action instead. -// See: https://github.com/xamarin/xamarin-macios/issues/15299 -// Leaving code commented here so we can more easily go back when the issue is fixed. - -// // typedef void (^SentryRequestFinished)(NSError * _Nullable); -// [Internal] -// delegate void SentryRequestFinished ([NullAllowed] NSError arg0); +// typedef void (^SentryRequestFinished)(NSError * _Nullable); +[Internal] +delegate void SentryRequestFinished ([NullAllowed] NSError error); -// // typedef void (^SentryRequestOperationFinished)(NSHTTPURLResponse * _Nullable, NSError * _Nullable); -// [Internal] -// delegate void SentryRequestOperationFinished ([NullAllowed] NSHttpUrlResponse arg0, [NullAllowed] NSError arg1); +// typedef void (^SentryRequestOperationFinished)(NSHTTPURLResponse * _Nullable, NSError * _Nullable); +[Internal] +delegate void SentryRequestOperationFinished ([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error); -// // typedef SentryBreadcrumb * _Nullable (^SentryBeforeBreadcrumbCallback)(SentryBreadcrumb * _Nonnull); -// [Internal] -// delegate SentryBreadcrumb SentryBeforeBreadcrumbCallback (SentryBreadcrumb arg0); +// typedef SentryBreadcrumb * _Nullable (^SentryBeforeBreadcrumbCallback)(SentryBreadcrumb * _Nonnull); +[Internal] +[return: NullAllowed] +delegate SentryBreadcrumb SentryBeforeBreadcrumbCallback (SentryBreadcrumb breadcrumb); -// // typedef SentryEvent * _Nullable (^SentryBeforeSendEventCallback)(SentryEvent * _Nonnull); -// [Internal] -// delegate SentryEvent SentryBeforeSendEventCallback (SentryEvent arg0); +// typedef SentryEvent * _Nullable (^SentryBeforeSendEventCallback)(SentryEvent * _Nonnull); +[Internal] +[return: NullAllowed] +delegate SentryEvent SentryBeforeSendEventCallback (SentryEvent @event); -// // typedef void (^SentryOnCrashedLastRunCallback)(SentryEvent * _Nonnull); -// [Internal] -// delegate void SentryOnCrashedLastRunCallback (SentryEvent arg0); +// typedef void (^SentryOnCrashedLastRunCallback)(SentryEvent * _Nonnull); +[Internal] +delegate void SentryOnCrashedLastRunCallback (SentryEvent @event); -// // typedef BOOL (^SentryShouldQueueEvent)(NSHTTPURLResponse * _Nullable, NSError * _Nullable); -// [Internal] -// delegate bool SentryShouldQueueEvent ([NullAllowed] NSHttpUrlResponse arg0, [NullAllowed] NSError arg1); +// typedef BOOL (^SentryShouldQueueEvent)(NSHTTPURLResponse * _Nullable, NSError * _Nullable); +[Internal] +delegate bool SentryShouldQueueEvent ([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error); -// // typedef NSNumber * _Nullable (^SentryTracesSamplerCallback)(SentrySamplingContext * _Nonnull); -// [Internal] -// delegate NSNumber SentryTracesSamplerCallback (SentrySamplingContext arg0); +// typedef NSNumber * _Nullable (^SentryTracesSamplerCallback)(SentrySamplingContext * _Nonnull); +[Internal] +[return: NullAllowed] +delegate NSNumber SentryTracesSamplerCallback (SentrySamplingContext samplingContext); // typedef void (^SentrySpanCallback)(id _Nullable); -// [Internal] -// delegate void SentrySpanCallback ([NullAllowed] SentrySpan arg0); +[Internal] +delegate void SentrySpanCallback ([NullAllowed] SentrySpan span); -// // typedef void (^SentryOnAppStartMeasurementAvailable)(SentryAppStartMeasurement * _Nullable); -// [Internal] -// delegate void SentryOnAppStartMeasurementAvailable ([NullAllowed] SentryAppStartMeasurement arg0); +// typedef void (^SentryOnAppStartMeasurementAvailable)(SentryAppStartMeasurement * _Nullable); +[Internal] +delegate void SentryOnAppStartMeasurementAvailable ([NullAllowed] SentryAppStartMeasurement appStartMeasurement); // @interface PrivateSentrySDKOnly : NSObject [BaseType (typeof(NSObject), Name="PrivateSentrySDKOnly")] @@ -112,7 +110,7 @@ interface PrivateSentrySdkOnly // @property (copy, nonatomic, class) SentryOnAppStartMeasurementAvailable _Nullable onAppStartMeasurementAvailable; [Static] [NullAllowed, Export ("onAppStartMeasurementAvailable", ArgumentSemantic.Copy)] - Action OnAppStartMeasurementAvailable { get; set; } + SentryOnAppStartMeasurementAvailable OnAppStartMeasurementAvailable { get; set; } // @property (readonly, nonatomic, class) SentryAppStartMeasurement * _Nullable appStartMeasurement; [Static] @@ -148,6 +146,11 @@ interface PrivateSentrySdkOnly [Static] [Export ("currentScreenFrames", ArgumentSemantic.Assign)] SentryScreenFrames CurrentScreenFrames { get; } + + // +(NSArray * _Nonnull)captureScreenshots; + [Static] + [Export ("captureScreenshots")] + NSData[] CaptureScreenshots(); } // @interface SentryAppStartMeasurement : NSObject @@ -881,15 +884,15 @@ interface SentryOptions // @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend; [NullAllowed, Export ("beforeSend", ArgumentSemantic.Copy)] - Func BeforeSend { get; set; } + SentryBeforeSendEventCallback BeforeSend { get; set; } // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb; [NullAllowed, Export ("beforeBreadcrumb", ArgumentSemantic.Copy)] - Func BeforeBreadcrumb { get; set; } + SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; } // @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun; [NullAllowed, Export ("onCrashedLastRun", ArgumentSemantic.Copy)] - Action OnCrashedLastRun { get; set; } + SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; } // @property (copy, nonatomic) NSArray * _Nullable integrations; [NullAllowed, Export ("integrations", ArgumentSemantic.Copy)] @@ -978,7 +981,7 @@ interface SentryOptions // @property (nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler; [NullAllowed, Export ("tracesSampler", ArgumentSemantic.Assign)] - Func TracesSampler { get; set; } + SentryTracesSamplerCallback TracesSampler { get; set; } // @property (readonly, assign, nonatomic) BOOL isTracingEnabled; [Export ("isTracingEnabled")] @@ -1022,7 +1025,7 @@ interface SentryOptions // @property (nonatomic) SentryTracesSamplerCallback _Nullable profilesSampler; [NullAllowed, Export ("profilesSampler", ArgumentSemantic.Assign)] - Func ProfilesSampler { get; set; } + SentryTracesSamplerCallback ProfilesSampler { get; set; } // @property (readonly, assign, nonatomic) BOOL isProfilingEnabled; [Export ("isProfilingEnabled")] @@ -1981,7 +1984,7 @@ interface SentryScope : SentrySerializable // -(void)useSpan:(SentrySpanCallback _Nonnull)callback; [Export ("useSpan:")] - void UseSpan (Action callback); + void UseSpan (SentrySpanCallback callback); } // @interface SentryScreenFrames : NSObject diff --git a/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj b/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj index 06c1edd955..3d046464e8 100644 --- a/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj +++ b/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj @@ -26,6 +26,17 @@ + + + + $(MSBuildThisFileDirectory)$(GeneratedSourcesDir)SupportDelegates.g.cs + + + +