From dc6c357b576eae935303ecdf1826d918498e195f Mon Sep 17 00:00:00 2001 From: GitHub Date: Thu, 22 Jan 2026 03:30:19 +0000 Subject: [PATCH 01/13] chore: update modules/sentry-cocoa.properties to 9.2.0 --- CHANGELOG.md | 3 +++ modules/sentry-cocoa.properties | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26bbf20371..c30e0f8b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - Bump Java SDK from v8.28.0 to v8.29.0 ([#4817](https://github.com/getsentry/sentry-dotnet/pull/4817)) - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8290) - [diff](https://github.com/getsentry/sentry-java/compare/8.28.0...8.29.0) +- Bump Cocoa SDK from v8.57.3 to v9.2.0 ([#4781](https://github.com/getsentry/sentry-dotnet/pull/4781)) + - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#920) + - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.57.3...9.2.0) ## 6.0.0 diff --git a/modules/sentry-cocoa.properties b/modules/sentry-cocoa.properties index 7e5e1be5d7..2d9f152329 100644 --- a/modules/sentry-cocoa.properties +++ b/modules/sentry-cocoa.properties @@ -1,2 +1,2 @@ -version = 8.57.3 +version = 9.2.0 repo = https://github.com/getsentry/sentry-cocoa From c460bad20c692a07bccf5a6b954c473b31eb6847 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 7 Jan 2026 12:49:54 +0100 Subject: [PATCH 02/13] Update bindings for Cocoa SDK v9 --- scripts/generate-cocoa-bindings.ps1 | 2 +- scripts/patch-cocoa-bindings.cs | 66 +- src/Sentry.Bindings.Cocoa/ApiDefinitions.cs | 2597 ++++++++--------- src/Sentry.Bindings.Cocoa/StructsAndEnums.cs | 37 +- .../Platforms/Cocoa/BindableSentryOptions.cs | 2 + src/Sentry/Platforms/Cocoa/CFunctions.cs | 2 +- src/Sentry/Platforms/Cocoa/Sentry.Cocoa.props | 1 + src/Sentry/Platforms/Cocoa/SentryOptions.cs | 5 +- src/Sentry/Platforms/Cocoa/SentrySdk.cs | 4 +- 9 files changed, 1381 insertions(+), 1335 deletions(-) diff --git a/scripts/generate-cocoa-bindings.ps1 b/scripts/generate-cocoa-bindings.ps1 index 38b5eae0a2..0e25e93be7 100644 --- a/scripts/generate-cocoa-bindings.ps1 +++ b/scripts/generate-cocoa-bindings.ps1 @@ -137,7 +137,7 @@ if (Test-Path $privateHeaderFile) { $content = Get-Content -Path $privateHeaderFile -Raw $content = $content -replace '"SentryDefines.h"', '"../Headers/SentryDefines.h"' - $content = $content -replace '"SentryProfilingConditionals.h"', '"../Headers/SentryProfilingConditionals.h"' + $content = $content -replace '"SentryProfilingConditionals.h"', '"../PrivateHeaders/SentryProfilingConditionals.h"' Set-Content -Path $privateHeaderFile -Value $content Write-Host "Patched includes: $privateHeaderFile" } diff --git a/scripts/patch-cocoa-bindings.cs b/scripts/patch-cocoa-bindings.cs index bcb3336487..c9fbd0371d 100644 --- a/scripts/patch-cocoa-bindings.cs +++ b/scripts/patch-cocoa-bindings.cs @@ -72,6 +72,10 @@ .WithAttribute("SentryBeforeBreadcrumbCallback", "return: NullAllowed") .WithAttribute("SentryBeforeSendEventCallback", "return: NullAllowed") .WithAttribute("SentryTracesSamplerCallback", "return: NullAllowed") + // Fix nullable return attributes + .RemoveAttribute("PrivateSentrySDKOnly", "Capture*", "NullAllowed") + .WithAttribute("PrivateSentrySDKOnly", "CaptureScreenshots", "return: NullAllowed") + .WithAttribute("PrivateSentrySDKOnly", "CaptureViewHierarchies", "return: NullAllowed") // For PrivateApiDefinitions.cs .WithModifier("SentryScope", "partial") // error CS0246: The type or namespace name 'iOS' could not be found @@ -88,20 +92,22 @@ .RemoveMethod("PrivateSentrySDKOnly", "CaptureEnvelope") .RemoveMethod("PrivateSentrySDKOnly", "EnvelopeWithData") .RemoveMethod("PrivateSentrySDKOnly", "StoreEnvelope") - // deprecated - .RemoveMethod("Sentry*", "CaptureUserFeedback") + // SentryLoggerDelegate and SentryCurrentDateProvider are not whitelisted + .RemoveMethod("SentryLogger", "Constructor") // SentryAppStartMeasurement is not whitelisted .RemoveDelegate("SentryOnAppStartMeasurementAvailable") - // deprecated + // unused .RemoveDelegate("SentryUserFeedbackConfigurationBlock") // error CS0114: 'SentryXxx.Description' hides inherited member 'NSObject.Description'. .RemoveProperty("Sentry*", "Description") // SentryAppStartMeasurement is not whitelisted .RemoveProperty("PrivateSentrySDKOnly", "*AppStartMeasurement*") - // SentryStructuredLogAttribute is not whitelisted - .RemoveProperty("SentryLog", "Attributes") - // deprecated + // Minimize SentryDependencyContainer + .RemoveMethod("SentryDependencyContainer", "*") + .KeepProperties("SentryDependencyContainer", "SharedInstance", "DebugImageProvider") + // SentryUserFeedbackConfiguration is not whitelisted .RemoveProperty("SentryOptions", "ConfigureUserFeedback") + .RemoveProperty("SentryOptions", "UserFeedbackConfiguration") .KeepInterfaces( "ISentryRRWebEvent", "PrivateSentrySDKOnly", @@ -111,6 +117,7 @@ "SentryClient", "SentryDebugImageProvider", "SentryDebugMeta", + "SentryDependencyContainer", "SentryDsn", "SentryEvent", "SentryException", @@ -123,12 +130,14 @@ "SentryHub", "SentryId", "SentryLog", + "SentryLogAttribute", "SentryLogger", "SentryMeasurementUnit", "SentryMeasurementUnitDuration", "SentryMeasurementUnitFraction", "SentryMeasurementUnitInformation", "SentryMechanism", + "SentryMechanismContext", "SentryMechanismMeta", "SentryMessage", "SentryNSError", @@ -159,7 +168,9 @@ ) // Rename and retarget the experimental options property .RenameProperty("SentryOptions", "_swiftExperimentalOptions", "Experimental") - .ChangePropertyType("SentryOptions", "Experimental", "SentryExperimentalOptions"); + .ChangePropertyType("SentryOptions", "Experimental", "SentryExperimentalOptions") + // error CS0311: The type 'SentryXxx' cannot be used as type parameter 'TValue' in the generic type or method 'NSDictionary'. + .ChangeGenericTypeArgument("NSDictionary", "Sentry*", "NSObject"); var formatted = CodeFormatter.Format(nodes, new AdhocWorkspace()); File.WriteAllText(args[0], formatted.ToFullString() + "\n"); @@ -219,6 +230,19 @@ public static CompilationUnitSyntax RemoveAttribute( .RemoveByPredicate(node => node.Attributes.Count == 0); } + public static CompilationUnitSyntax RemoveAttribute( + this CompilationUnitSyntax root, + string type, + string name, + string attribute) + { + return root.RemoveByPredicate(node => + node.Name.Matches(attribute) && + node.Parent?.Parent is MethodDeclarationSyntax method && + method.Identifier.Matches(name) && + method.HasParent(type)); + } + public static CompilationUnitSyntax RemoveBaseType( this CompilationUnitSyntax root, string name) @@ -275,6 +299,18 @@ public static CompilationUnitSyntax WithAttribute( return root.ReplaceNodes(nodes, (node, _) => node.WithAttribute(attribute)); } + public static CompilationUnitSyntax WithAttribute( + this CompilationUnitSyntax root, + string type, + string name, + string attribute) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(name) && node.HasParent(type) && !node.HasAttribute(attribute)); + return root.ReplaceNodes(nodes, (node, _) => node.WithAttribute(attribute)); + } + public static CompilationUnitSyntax AsInternal( this CompilationUnitSyntax root, string name, @@ -417,6 +453,22 @@ public static CompilationUnitSyntax ChangePropertyType( return root.ReplaceNodes(nodes, (node, _) => node.WithType(SyntaxFactory.ParseTypeName(newType))); } + public static CompilationUnitSyntax ChangeGenericTypeArgument( + this CompilationUnitSyntax root, + string type, + string from, + string to) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(type) && node.TypeArgumentList.Arguments.Any(arg => arg.Matches(from))); + + return root.ReplaceNodes(nodes, (node, _) => + { + var args = node.TypeArgumentList.Arguments.Select(arg => arg.Matches(from) ? SyntaxFactory.ParseTypeName(to) : arg); + return node.WithTypeArgumentList(node.TypeArgumentList.WithArguments(SyntaxFactory.SeparatedList(args))); + }); + } } internal static class SyntaxNodeExtensions diff --git a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs index 01bc00ba1a..44965e323a 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -6,6 +6,7 @@ using System; using CoreFoundation; +using CoreGraphics; using Foundation; using MetricKit; using ObjCRuntime; @@ -36,10 +37,6 @@ namespace Sentry.CocoaSdk; [Internal] delegate SentrySpan SentryBeforeSendSpanCallback(SentrySpan span); -// typedef SentryLog * _Nullable (^SentryBeforeSendLogCallback)(SentryLog * _Nonnull); -[Internal] -delegate SentryLog SentryBeforeSendLogCallback(SentryLog log); - // typedef BOOL (^SentryBeforeCaptureScreenshotCallback)(SentryEvent * _Nonnull); [Internal] delegate bool SentryBeforeCaptureScreenshotCallback(SentryEvent @event); @@ -61,10 +58,6 @@ namespace Sentry.CocoaSdk; [return: NullAllowed] delegate NSNumber SentryTracesSamplerCallback(SentrySamplingContext samplingContext); -// typedef void (^SentrySpanCallback)(DEPRECATED_MSG_ATTRIBUTE("See `SentryScope.useSpan` for reasoning of deprecation.") id); -[Internal] -delegate void SentrySpanCallback(SentrySpan span); - // @interface SentryAttachment : NSObject [BaseType(typeof(NSObject))] [DisableDefaultCtor] @@ -91,6 +84,14 @@ interface SentryAttachment [Export("initWithPath:filename:contentType:")] NativeHandle Constructor(string path, string filename, [NullAllowed] string contentType); + // -(instancetype _Nonnull)initWithData:(NSData * _Nonnull)data filename:(NSString * _Nonnull)filename contentType:(NSString * _Nullable)contentType attachmentType:(SentryAttachmentType)attachmentType; + [Export("initWithData:filename:contentType:attachmentType:")] + NativeHandle Constructor(NSData data, string filename, [NullAllowed] string contentType, SentryAttachmentType attachmentType); + + // -(instancetype _Nonnull)initWithPath:(NSString * _Nonnull)path filename:(NSString * _Nonnull)filename contentType:(NSString * _Nullable)contentType attachmentType:(SentryAttachmentType)attachmentType; + [Export("initWithPath:filename:contentType:attachmentType:")] + NativeHandle Constructor(string path, string filename, [NullAllowed] string contentType, SentryAttachmentType attachmentType); + // @property (readonly, nonatomic, strong) NSData * _Nullable data; [NullAllowed, Export("data", ArgumentSemantic.Strong)] NSData Data { get; } @@ -106,6 +107,10 @@ interface SentryAttachment // @property (readonly, copy, nonatomic) NSString * _Nullable contentType; [NullAllowed, Export("contentType")] string ContentType { get; } + + // @property (readonly, nonatomic) SentryAttachmentType attachmentType; + [Export("attachmentType")] + SentryAttachmentType AttachmentType { get; } } // @interface SentryBaggage : NSObject @@ -137,10 +142,6 @@ interface SentryBaggage [NullAllowed, Export("userId")] string UserId { get; } - // @property (readonly, nonatomic) NSString * _Nullable userSegment; - [NullAllowed, Export("userSegment")] - string UserSegment { get; } - // @property (readonly, nonatomic) NSString * _Nullable sampleRand; [NullAllowed, Export("sampleRand")] string SampleRand { get; } @@ -157,13 +158,13 @@ interface SentryBaggage [NullAllowed, Export("replayId", ArgumentSemantic.Strong)] string ReplayId { get; set; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId publicKey:(NSString * _Nonnull)publicKey releaseName:(NSString * _Nullable)releaseName environment:(NSString * _Nullable)environment transaction:(NSString * _Nullable)transaction userSegment:(NSString * _Nullable)userSegment sampleRate:(NSString * _Nullable)sampleRate sampled:(NSString * _Nullable)sampled replayId:(NSString * _Nullable)replayId; - [Export("initWithTraceId:publicKey:releaseName:environment:transaction:userSegment:sampleRate:sampled:replayId:")] - NativeHandle Constructor(SentryId traceId, string publicKey, [NullAllowed] string releaseName, [NullAllowed] string environment, [NullAllowed] string transaction, [NullAllowed] string userSegment, [NullAllowed] string sampleRate, [NullAllowed] string sampled, [NullAllowed] string replayId); + // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId publicKey:(NSString * _Nonnull)publicKey releaseName:(NSString * _Nullable)releaseName environment:(NSString * _Nullable)environment transaction:(NSString * _Nullable)transaction sampleRate:(NSString * _Nullable)sampleRate sampled:(NSString * _Nullable)sampled replayId:(NSString * _Nullable)replayId; + [Export("initWithTraceId:publicKey:releaseName:environment:transaction:sampleRate:sampled:replayId:")] + NativeHandle Constructor(SentryId traceId, string publicKey, [NullAllowed] string releaseName, [NullAllowed] string environment, [NullAllowed] string transaction, [NullAllowed] string sampleRate, [NullAllowed] string sampled, [NullAllowed] string replayId); - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId publicKey:(NSString * _Nonnull)publicKey releaseName:(NSString * _Nullable)releaseName environment:(NSString * _Nullable)environment transaction:(NSString * _Nullable)transaction userSegment:(NSString * _Nullable)userSegment sampleRate:(NSString * _Nullable)sampleRate sampleRand:(NSString * _Nullable)sampleRand sampled:(NSString * _Nullable)sampled replayId:(NSString * _Nullable)replayId; - [Export("initWithTraceId:publicKey:releaseName:environment:transaction:userSegment:sampleRate:sampleRand:sampled:replayId:")] - NativeHandle Constructor(SentryId traceId, string publicKey, [NullAllowed] string releaseName, [NullAllowed] string environment, [NullAllowed] string transaction, [NullAllowed] string userSegment, [NullAllowed] string sampleRate, [NullAllowed] string sampleRand, [NullAllowed] string sampled, [NullAllowed] string replayId); + // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId publicKey:(NSString * _Nonnull)publicKey releaseName:(NSString * _Nullable)releaseName environment:(NSString * _Nullable)environment transaction:(NSString * _Nullable)transaction sampleRate:(NSString * _Nullable)sampleRate sampleRand:(NSString * _Nullable)sampleRand sampled:(NSString * _Nullable)sampled replayId:(NSString * _Nullable)replayId; + [Export("initWithTraceId:publicKey:releaseName:environment:transaction:sampleRate:sampleRand:sampled:replayId:")] + NativeHandle Constructor(SentryId traceId, string publicKey, [NullAllowed] string releaseName, [NullAllowed] string environment, [NullAllowed] string transaction, [NullAllowed] string sampleRate, [NullAllowed] string sampleRand, [NullAllowed] string sampled, [NullAllowed] string replayId); // -(NSString * _Nonnull)toHTTPHeaderWithOriginalBaggage:(NSDictionary * _Nullable)originalBaggage; [Export("toHTTPHeaderWithOriginalBaggage:")] @@ -234,108 +235,11 @@ interface SentryBreadcrumb : SentrySerializable nuint Hash { get; } } -// @interface SentryClient : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryClient -{ - // @property (readonly, assign, nonatomic) BOOL isEnabled; - [Export("isEnabled")] - bool IsEnabled { get; } - - // @property (nonatomic, strong) SentryOptions * _Nonnull options; - [Export("options", ArgumentSemantic.Strong)] - SentryOptions Options { get; set; } - - // -(instancetype _Nullable)initWithOptions:(SentryOptions * _Nonnull)options; - [Export("initWithOptions:")] - NativeHandle Constructor(SentryOptions options); - - // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event __attribute__((swift_name("capture(event:)"))); - [Export("captureEvent:")] - SentryId CaptureEvent(SentryEvent @event); - - // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(event:scope:)"))); - [Export("captureEvent:withScope:")] - SentryId CaptureEvent(SentryEvent @event, SentryScope scope); - - // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error __attribute__((swift_name("capture(error:)"))); - [Export("captureError:")] - SentryId CaptureError(NSError error); - - // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(error:scope:)"))); - [Export("captureError:withScope:")] - SentryId CaptureError(NSError error, SentryScope scope); - - // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception __attribute__((swift_name("capture(exception:)"))); - [Export("captureException:")] - SentryId CaptureException(NSException exception); - - // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(exception:scope:)"))); - [Export("captureException:withScope:")] - SentryId CaptureException(NSException exception, SentryScope scope); - - // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message __attribute__((swift_name("capture(message:)"))); - [Export("captureMessage:")] - SentryId CaptureMessage(string message); - - // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(message:scope:)"))); - [Export("captureMessage:withScope:")] - SentryId CaptureMessage(string message, SentryScope scope); - - // -(void)captureFeedback:(SentryFeedback * _Nonnull)feedback withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(feedback:scope:)"))); - [Export("captureFeedback:withScope:")] - void CaptureFeedback(SentryFeedback feedback, SentryScope scope); - - // -(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)"))); - [Export("flush:")] - void Flush(double timeout); - - // -(void)close; - [Export("close")] - void Close(); -} - -// @interface SentryDebugImageProvider : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentryDebugImageProvider -{ - // -(NSArray * _Nonnull)getDebugImagesForThreads:(NSArray * _Nonnull)threads __attribute__((deprecated("Use -[getDebugImagesForThreads:isCrash:] instead."))); - [Export("getDebugImagesForThreads:")] - SentryDebugMeta[] GetDebugImagesForThreads(SentryThread[] threads); - - // -(NSArray * _Nonnull)getDebugImagesForThreads:(NSArray * _Nonnull)threads isCrash:(BOOL)isCrash __attribute__((deprecated("This method is slow and will be removed in a future version. Use -[getDebugImagesFromCacheForThreads:] instead."))); - [Export("getDebugImagesForThreads:isCrash:")] - SentryDebugMeta[] GetDebugImagesForThreads(SentryThread[] threads, bool isCrash); - - // -(NSArray * _Nonnull)getDebugImagesForFrames:(NSArray * _Nonnull)frames __attribute__((deprecated("Use -[getDebugImagesForFrames:isCrash:] instead."))); - [Export("getDebugImagesForFrames:")] - SentryDebugMeta[] GetDebugImagesForFrames(SentryFrame[] frames); - - // -(NSArray * _Nonnull)getDebugImagesForFrames:(NSArray * _Nonnull)frames isCrash:(BOOL)isCrash __attribute__((deprecated("This method is slow and will be removed in a future version. Use -[getDebugImagesFromCacheForFrames:] instead."))); - [Export("getDebugImagesForFrames:isCrash:")] - SentryDebugMeta[] GetDebugImagesForFrames(SentryFrame[] frames, bool isCrash); - - // -(NSArray * _Nonnull)getDebugImages __attribute__((deprecated("Use -[getDebugImagesCrashed:] instead."))); - [Export("getDebugImages")] - SentryDebugMeta[] DebugImages { get; } - - // -(NSArray * _Nonnull)getDebugImagesCrashed:(BOOL)isCrash __attribute__((deprecated("This method is slow and will be removed in a future version. Use -[getDebugImagesFromCache:] instead."))); - [Export("getDebugImagesCrashed:")] - SentryDebugMeta[] GetDebugImagesCrashed(bool isCrash); -} - // @interface SentryDebugMeta : NSObject [BaseType(typeof(NSObject))] [Internal] interface SentryDebugMeta : SentrySerializable { - // @property (copy, nonatomic) NSString * _Nullable uuid; - [NullAllowed, Export("uuid")] - string Uuid { get; set; } - // @property (copy, nonatomic) NSString * _Nullable debugID; [NullAllowed, Export("debugID")] string DebugID { get; set; } @@ -344,10 +248,6 @@ interface SentryDebugMeta : SentrySerializable [NullAllowed, Export("type")] string Type { get; set; } - // @property (copy, nonatomic) NSString * _Nullable name; - [NullAllowed, Export("name")] - string Name { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable imageSize; [NullAllowed, Export("imageSize", ArgumentSemantic.Copy)] NSNumber ImageSize { get; set; } @@ -365,32 +265,6 @@ interface SentryDebugMeta : SentrySerializable string CodeFile { get; set; } } -// @interface SentryDsn : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentryDsn -{ - // @property (readonly, nonatomic, strong) NSURL * _Nonnull url; - [Export("url", ArgumentSemantic.Strong)] - NSUrl Url { get; } - - // -(instancetype _Nullable)initWithString:(NSString * _Nonnull)dsnString didFailWithError:(NSError * _Nullable * _Nullable)error; - [Export("initWithString:didFailWithError:")] - NativeHandle Constructor(string dsnString, [NullAllowed] out NSError error); - - // -(NSString * _Nonnull)getHash; - [Export("getHash")] - string Hash { get; } - - // -(NSURL * _Nonnull)getStoreEndpoint __attribute__((deprecated("This endpoint is no longer used"))); - [Export("getStoreEndpoint")] - NSUrl StoreEndpoint { get; } - - // -(NSURL * _Nonnull)getEnvelopeEndpoint; - [Export("getEnvelopeEndpoint")] - NSUrl EnvelopeEndpoint { get; } -} - // @interface SentryEvent : NSObject [BaseType(typeof(NSObject))] [Internal] @@ -416,7 +290,7 @@ interface SentryEvent : SentrySerializable [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] NSDate StartTimestamp { get; set; } - // @property (nonatomic) enum SentryLevel level; + // @property (nonatomic) SentryLevel level; [Export("level", ArgumentSemantic.Assign)] SentryLevel Level { get; set; } @@ -520,12 +394,12 @@ interface SentryEvent : SentrySerializable [Internal] interface SentryException : SentrySerializable { - // @property (copy, nonatomic) NSString * _Nonnull value; - [Export("value")] + // @property (copy, nonatomic) NSString * _Nullable value; + [NullAllowed, Export("value")] string Value { get; set; } - // @property (copy, nonatomic) NSString * _Nonnull type; - [Export("type")] + // @property (copy, nonatomic) NSString * _Nullable type; + [NullAllowed, Export("type")] string Type { get; set; } // @property (nonatomic, strong) SentryMechanism * _Nullable mechanism; @@ -544,20 +418,9 @@ interface SentryException : SentrySerializable [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] SentryStacktrace Stacktrace { get; set; } - // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value type:(NSString * _Nonnull)type; + // -(instancetype _Nonnull)initWithValue:(NSString * _Nullable)value type:(NSString * _Nullable)type; [Export("initWithValue:type:")] - NativeHandle Constructor(string value, string type); -} - -// @interface SentryFeedbackAPI : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentryFeedbackAPI -{ - [Export("showWidget")] - void ShowWidget(); - [Export("hideWidget")] - void HideWidget(); + NativeHandle Constructor([NullAllowed] string value, [NullAllowed] string type); } // @interface SentryFrame : NSObject @@ -597,10 +460,6 @@ interface SentryFrame : SentrySerializable [NullAllowed, Export("instructionAddress")] string InstructionAddress { get; set; } - // @property (nonatomic) NSUInteger instruction; - [Export("instruction")] - nuint Instruction { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable lineNumber; [NullAllowed, Export("lineNumber", ArgumentSemantic.Copy)] NSNumber LineNumber { get; set; } @@ -683,419 +542,118 @@ interface SentryHttpStatusCodeRange NativeHandle Constructor(nint statusCode); } -// @interface SentrySpanContext : NSObject +// @interface SentryId : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentryId +{ + // @property (readonly, nonatomic, strong, class) SentryId * _Nonnull empty; + [Static] + [Export("empty", ArgumentSemantic.Strong)] + SentryId Empty { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString; + [Export("sentryIdString")] + string SentryIdString { get; } + + // -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer)); + [Export("initWithUuid:")] + [DesignatedInitializer] + NativeHandle Constructor(NSUuid uuid); + + // -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer)); + [Export("initWithUUIDString:")] + [DesignatedInitializer] + NativeHandle Constructor(string uuidString); +} + +// @interface SentryMeasurementUnit : NSObject [BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] -interface SentrySpanContext : SentrySerializable +interface SentryMeasurementUnit { - // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export("traceId")] - SentryId TraceId { get; } + // -(instancetype _Nonnull)initWithUnit:(NSString * _Nonnull)unit; + [Export("initWithUnit:")] + NativeHandle Constructor(string unit); - // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; - [Export("spanId")] - SentrySpanId SpanId { get; } + // @property (readonly, copy) NSString * _Nonnull unit; + [Export("unit")] + string Unit { get; } - // @property (readonly, nonatomic) SentrySpanId * _Nullable parentSpanId; - [NullAllowed, Export("parentSpanId")] - SentrySpanId ParentSpanId { get; } + // @property (readonly, copy, class) SentryMeasurementUnit * _Nonnull none; + [Static] + [Export("none", ArgumentSemantic.Copy)] + SentryMeasurementUnit None { get; } +} - // @property (readonly, nonatomic) SentrySampleDecision sampled; - [Export("sampled")] - SentrySampleDecision Sampled { get; } +// @interface SentryMeasurementUnitDuration : SentryMeasurementUnit +[BaseType(typeof(SentryMeasurementUnit))] +[DisableDefaultCtor] +[Internal] +interface SentryMeasurementUnitDuration +{ + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull nanosecond; + [Static] + [Export("nanosecond", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Nanosecond { get; } - // @property (readonly, copy, nonatomic) NSString * _Nonnull operation; - [Export("operation")] - string Operation { get; } + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull microsecond; + [Static] + [Export("microsecond", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Microsecond { get; } - // @property (readonly, copy, nonatomic) NSString * _Nullable spanDescription; - [NullAllowed, Export("spanDescription")] - string SpanDescription { get; } + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull millisecond; + [Static] + [Export("millisecond", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Millisecond { get; } - // @property (copy, nonatomic) NSString * _Nonnull origin; - [Export("origin")] - string Origin { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull second; + [Static] + [Export("second", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Second { get; } - // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation; - [Export("initWithOperation:")] - NativeHandle Constructor(string operation); + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull minute; + [Static] + [Export("minute", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Minute { get; } - // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled; - [Export("initWithOperation:sampled:")] - NativeHandle Constructor(string operation, SentrySampleDecision sampled); + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull hour; + [Static] + [Export("hour", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Hour { get; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentId:(SentrySpanId * _Nullable)parentId operation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled; - [Export("initWithTraceId:spanId:parentId:operation:sampled:")] - NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, SentrySampleDecision sampled); + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull day; + [Static] + [Export("day", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Day { get; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentId:(SentrySpanId * _Nullable)parentId operation:(NSString * _Nonnull)operation spanDescription:(NSString * _Nullable)description sampled:(SentrySampleDecision)sampled; - [Export("initWithTraceId:spanId:parentId:operation:spanDescription:sampled:")] - NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, [NullAllowed] string description, SentrySampleDecision sampled); + // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull week; + [Static] + [Export("week", ArgumentSemantic.Copy)] + SentryMeasurementUnitDuration Week { get; } } -// @protocol SentrySpan -[Protocol] +// @interface SentryMeasurementUnitInformation : SentryMeasurementUnit +[BaseType(typeof(SentryMeasurementUnit))] +[DisableDefaultCtor] [Internal] -[Model] -[BaseType (typeof(NSObject))] -interface SentrySpan : SentrySerializable +interface SentryMeasurementUnitInformation { - // @required @property (nonatomic, strong) SentryId * _Nonnull traceId; - [Abstract] - [Export("traceId", ArgumentSemantic.Strong)] - SentryId TraceId { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull bit; + [Static] + [Export("bit", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Bit { get; } - // @required @property (nonatomic, strong) SentrySpanId * _Nonnull spanId; - [Abstract] - [Export("spanId", ArgumentSemantic.Strong)] - SentrySpanId SpanId { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull byte; + [Static] + [Export("byte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Byte { get; } - // @required @property (nonatomic, strong) SentrySpanId * _Nullable parentSpanId; - [Abstract] - [NullAllowed, Export("parentSpanId", ArgumentSemantic.Strong)] - SentrySpanId ParentSpanId { get; set; } - - // @required @property (nonatomic) SentrySampleDecision sampled; - [Abstract] - [Export("sampled", ArgumentSemantic.Assign)] - SentrySampleDecision Sampled { get; set; } - - // @required @property (copy, nonatomic) NSString * _Nonnull operation; - [Abstract] - [Export("operation")] - string Operation { get; set; } - - // @required @property (copy, nonatomic) NSString * _Nonnull origin; - [Abstract] - [Export("origin")] - string Origin { get; set; } - - // @required @property (copy, nonatomic) NSString * _Nullable spanDescription; - [Abstract] - [NullAllowed, Export("spanDescription")] - string SpanDescription { get; set; } - - // @required @property (nonatomic) SentrySpanStatus status; - [Abstract] - [Export("status", ArgumentSemantic.Assign)] - SentrySpanStatus Status { get; set; } - - // @required @property (nonatomic, strong) NSDate * _Nullable timestamp; - [Abstract] - [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] - NSDate Timestamp { get; set; } - - // @required @property (nonatomic, strong) NSDate * _Nullable startTimestamp; - [Abstract] - [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] - NSDate StartTimestamp { get; set; } - - // @required @property (readonly) NSDictionary * _Nonnull data; - [Abstract] - [Export("data")] - NSDictionary Data { get; } - - // @required @property (readonly) NSDictionary * _Nonnull tags; - [Abstract] - [Export("tags")] - NSDictionary Tags { get; } - - // @required @property (readonly) BOOL isFinished; - [Abstract] - [Export("isFinished")] - bool IsFinished { get; } - - // @required @property (readonly, nonatomic) SentryTraceContext * _Nullable traceContext; - [Abstract] - [NullAllowed, Export("traceContext")] - SentryTraceContext TraceContext { get; } - - // @required -(id _Nonnull)startChildWithOperation:(NSString * _Nonnull)operation __attribute__((swift_name("startChild(operation:)"))); - [Abstract] - [Export("startChildWithOperation:")] - SentrySpan StartChildWithOperation(string operation); - - // @required -(id _Nonnull)startChildWithOperation:(NSString * _Nonnull)operation description:(NSString * _Nullable)description __attribute__((swift_name("startChild(operation:description:)"))); - [Abstract] - [Export("startChildWithOperation:description:")] - SentrySpan StartChildWithOperation(string operation, [NullAllowed] string description); - - // @required -(void)setDataValue:(id _Nullable)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setData(value:key:)"))); - [Abstract] - [Export("setDataValue:forKey:")] - void SetDataValue([NullAllowed] NSObject value, string key); - - // @required -(void)setExtraValue:(id _Nullable)value forKey:(NSString * _Nonnull)key __attribute__((deprecated(""))) __attribute__((swift_name("setExtra(value:key:)"))); - [Abstract] - [Export("setExtraValue:forKey:")] - void SetExtraValue([NullAllowed] NSObject value, string key); - - // @required -(void)removeDataForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeData(key:)"))); - [Abstract] - [Export("removeDataForKey:")] - void RemoveDataForKey(string key); - - // @required -(void)setTagValue:(NSString * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setTag(value:key:)"))); - [Abstract] - [Export("setTagValue:forKey:")] - void SetTagValue(string value, string key); - - // @required -(void)removeTagForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeTag(key:)"))); - [Abstract] - [Export("removeTagForKey:")] - void RemoveTagForKey(string key); - - // @required -(void)setMeasurement:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value __attribute__((swift_name("setMeasurement(name:value:)"))); - [Abstract] - [Export("setMeasurement:value:")] - void SetMeasurement(string name, NSNumber value); - - // @required -(void)setMeasurement:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value unit:(SentryMeasurementUnit * _Nonnull)unit __attribute__((swift_name("setMeasurement(name:value:unit:)"))); - [Abstract] - [Export("setMeasurement:value:unit:")] - void SetMeasurement(string name, NSNumber value, SentryMeasurementUnit unit); - - // @required -(void)finish; - [Abstract] - [Export("finish")] - void Finish(); - - // @required -(void)finishWithStatus:(SentrySpanStatus)status __attribute__((swift_name("finish(status:)"))); - [Abstract] - [Export("finishWithStatus:")] - void FinishWithStatus(SentrySpanStatus status); - - // @required -(SentryTraceHeader * _Nonnull)toTraceHeader; - [Abstract] - [Export("toTraceHeader")] - SentryTraceHeader ToTraceHeader(); - - // @required -(NSString * _Nullable)baggageHttpHeader; - [Abstract] - [NullAllowed, Export("baggageHttpHeader")] - string BaggageHttpHeader { get; } - - // @required -(NSDictionary * _Nonnull)serialize; - [Abstract] - [Export("serialize")] - NSDictionary Serialize(); -} - -// @interface SentryHub : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryHub -{ - // -(instancetype _Nonnull)initWithClient:(SentryClient * _Nullable)client andScope:(SentryScope * _Nullable)scope; - [Export("initWithClient:andScope:")] - NativeHandle Constructor([NullAllowed] SentryClient client, [NullAllowed] SentryScope scope); - - // -(void)startSession; - [Export("startSession")] - void StartSession(); - - // -(void)endSession; - [Export("endSession")] - void EndSession(); - - // -(void)endSessionWithTimestamp:(NSDate * _Nonnull)timestamp; - [Export("endSessionWithTimestamp:")] - void EndSessionWithTimestamp(NSDate timestamp); - - // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event __attribute__((swift_name("capture(event:)"))); - [Export("captureEvent:")] - SentryId CaptureEvent(SentryEvent @event); - - // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(event:scope:)"))); - [Export("captureEvent:withScope:")] - SentryId CaptureEvent(SentryEvent @event, SentryScope scope); - - // -(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation __attribute__((swift_name("startTransaction(name:operation:)"))); - [Export("startTransactionWithName:operation:")] - SentrySpan StartTransactionWithName(string name, string operation); - - // -(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope __attribute__((swift_name("startTransaction(name:operation:bindToScope:)"))); - [Export("startTransactionWithName:operation:bindToScope:")] - SentrySpan StartTransactionWithName(string name, string operation, bool bindToScope); - - // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext __attribute__((swift_name("startTransaction(transactionContext:)"))); - [Export("startTransactionWithContext:")] - SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext); - - // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope __attribute__((swift_name("startTransaction(transactionContext:bindToScope:)"))); - [Export("startTransactionWithContext:bindToScope:")] - SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope); - - // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext __attribute__((swift_name("startTransaction(transactionContext:bindToScope:customSamplingContext:)"))); - [Export("startTransactionWithContext:bindToScope:customSamplingContext:")] - SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope, NSDictionary customSamplingContext); - - // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext __attribute__((swift_name("startTransaction(transactionContext:customSamplingContext:)"))); - [Export("startTransactionWithContext:customSamplingContext:")] - SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); - - // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error __attribute__((swift_name("capture(error:)"))); - [Export("captureError:")] - SentryId CaptureError(NSError error); - - // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(error:scope:)"))); - [Export("captureError:withScope:")] - SentryId CaptureError(NSError error, SentryScope scope); - - // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception __attribute__((swift_name("capture(exception:)"))); - [Export("captureException:")] - SentryId CaptureException(NSException exception); - - // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(exception:scope:)"))); - [Export("captureException:withScope:")] - SentryId CaptureException(NSException exception, SentryScope scope); - - // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message __attribute__((swift_name("capture(message:)"))); - [Export("captureMessage:")] - SentryId CaptureMessage(string message); - - // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope __attribute__((swift_name("capture(message:scope:)"))); - [Export("captureMessage:withScope:")] - SentryId CaptureMessage(string message, SentryScope scope); - - // -(void)captureFeedback:(SentryFeedback * _Nonnull)feedback; - [Export("captureFeedback:")] - void CaptureFeedback(SentryFeedback feedback); - - // -(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback; - [Export("configureScope:")] - void ConfigureScope(Action callback); - - // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb; - [Export("addBreadcrumb:")] - void AddBreadcrumb(SentryBreadcrumb crumb); - - // -(SentryClient * _Nullable)getClient; - [NullAllowed, Export("getClient")] - SentryClient Client { get; } - - // @property (readonly, nonatomic, strong) SentryScope * _Nonnull scope; - [Export("scope", ArgumentSemantic.Strong)] - SentryScope Scope { get; } - - // -(void)bindClient:(SentryClient * _Nullable)client; - [Export("bindClient:")] - void BindClient([NullAllowed] SentryClient client); - - // -(BOOL)hasIntegration:(NSString * _Nonnull)integrationName; - [Export("hasIntegration:")] - bool HasIntegration(string integrationName); - - // -(BOOL)isIntegrationInstalled:(Class _Nonnull)integrationClass; - [Export("isIntegrationInstalled:")] - bool IsIntegrationInstalled(Class integrationClass); - - // -(void)setUser:(SentryUser * _Nullable)user; - [Export("setUser:")] - void SetUser([NullAllowed] SentryUser user); - - // -(void)reportFullyDisplayed; - [Export("reportFullyDisplayed")] - void ReportFullyDisplayed(); - - // -(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)"))); - [Export("flush:")] - void Flush(double timeout); - - // -(void)close; - [Export("close")] - void Close(); -} - -// @interface SentryMeasurementUnit : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryMeasurementUnit -{ - // -(instancetype _Nonnull)initWithUnit:(NSString * _Nonnull)unit; - [Export("initWithUnit:")] - NativeHandle Constructor(string unit); - - // @property (readonly, copy) NSString * _Nonnull unit; - [Export("unit")] - string Unit { get; } - - // @property (readonly, copy, class) SentryMeasurementUnit * _Nonnull none; - [Static] - [Export("none", ArgumentSemantic.Copy)] - SentryMeasurementUnit None { get; } -} - -// @interface SentryMeasurementUnitDuration : SentryMeasurementUnit -[BaseType(typeof(SentryMeasurementUnit))] -[DisableDefaultCtor] -[Internal] -interface SentryMeasurementUnitDuration -{ - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull nanosecond; - [Static] - [Export("nanosecond", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Nanosecond { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull microsecond; - [Static] - [Export("microsecond", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Microsecond { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull millisecond; - [Static] - [Export("millisecond", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Millisecond { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull second; - [Static] - [Export("second", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Second { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull minute; - [Static] - [Export("minute", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Minute { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull hour; - [Static] - [Export("hour", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Hour { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull day; - [Static] - [Export("day", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Day { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull week; - [Static] - [Export("week", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Week { get; } -} - -// @interface SentryMeasurementUnitInformation : SentryMeasurementUnit -[BaseType(typeof(SentryMeasurementUnit))] -[DisableDefaultCtor] -[Internal] -interface SentryMeasurementUnitInformation -{ - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull bit; - [Static] - [Export("bit", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Bit { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull byte; - [Static] - [Export("byte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Byte { get; } - - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kilobyte; - [Static] - [Export("kilobyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Kilobyte { get; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kilobyte; + [Static] + [Export("kilobyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Kilobyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kibibyte; [Static] @@ -1200,19 +758,19 @@ interface SentryMechanism : SentrySerializable [NullAllowed, Export("helpLink")] string HelpLink { get; set; } - // @property (nonatomic, strong) SentryMechanismMeta * _Nullable meta; + // @property (nonatomic, strong) SentryMechanismContext * _Nullable meta; [NullAllowed, Export("meta", ArgumentSemantic.Strong)] - SentryMechanismMeta Meta { get; set; } + SentryMechanismContext Meta { get; set; } // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type; [Export("initWithType:")] NativeHandle Constructor(string type); } -// @interface SentryMechanismMeta : NSObject +// @interface SentryMechanismContext : NSObject [BaseType(typeof(NSObject))] [Internal] -interface SentryMechanismMeta : SentrySerializable +interface SentryMechanismContext : SentrySerializable { // @property (nonatomic, strong) NSDictionary * _Nullable signal; [NullAllowed, Export("signal", ArgumentSemantic.Strong)] @@ -1269,861 +827,1131 @@ interface SentryNSError : SentrySerializable NativeHandle Constructor(string domain, nint code); } -// @interface SentryOptions : NSObject +// @interface SentryReplayApi : NSObject [BaseType(typeof(NSObject))] [Internal] -interface SentryOptions +interface SentryReplayApi { - // @property (nonatomic, strong) NSString * _Nullable dsn; - [NullAllowed, Export("dsn", ArgumentSemantic.Strong)] - string Dsn { get; set; } + // -(void)maskView:(UIView * _Nonnull)view __attribute__((swift_name("maskView(_:)"))); + [Export("maskView:")] + void MaskView(UIView view); - // @property (nonatomic, strong) SentryDsn * _Nullable parsedDsn; - [NullAllowed, Export("parsedDsn", ArgumentSemantic.Strong)] - SentryDsn ParsedDsn { get; set; } + // -(void)unmaskView:(UIView * _Nonnull)view __attribute__((swift_name("unmaskView(_:)"))); + [Export("unmaskView:")] + void UnmaskView(UIView view); - // @property (assign, nonatomic) BOOL debug; - [Export("debug")] - bool Debug { get; set; } + // -(void)pause; + [Export("pause")] + void Pause(); - // @property (assign, nonatomic) SentryLevel diagnosticLevel; - [Export("diagnosticLevel", ArgumentSemantic.Assign)] - SentryLevel DiagnosticLevel { get; set; } + // -(void)resume; + [Export("resume")] + void Resume(); - // @property (copy, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export("releaseName")] - string ReleaseName { get; set; } + // -(void)start; + [Export("start")] + void Start(); - // @property (copy, nonatomic) NSString * _Nullable dist; - [NullAllowed, Export("dist")] - string Dist { get; set; } + // -(void)stop; + [Export("stop")] + void Stop(); + + // -(void)showMaskPreview; + [Export("showMaskPreview")] + void ShowMaskPreview(); + + // -(void)showMaskPreview:(CGFloat)opacity; + [Export("showMaskPreview:")] + void ShowMaskPreview(nfloat opacity); + + // -(void)hideMaskPreview; + [Export("hideMaskPreview")] + void HideMaskPreview(); +} + +// @interface SentryRequest : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentryRequest : SentrySerializable +{ + // @property (copy, nonatomic) NSNumber * _Nullable bodySize; + [NullAllowed, Export("bodySize", ArgumentSemantic.Copy)] + NSNumber BodySize { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable cookies; + [NullAllowed, Export("cookies")] + string Cookies { get; set; } + + // @property (nonatomic, strong) NSDictionary * _Nullable headers; + [NullAllowed, Export("headers", ArgumentSemantic.Strong)] + NSDictionary Headers { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable fragment; + [NullAllowed, Export("fragment")] + string Fragment { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable method; + [NullAllowed, Export("method")] + string Method { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable queryString; + [NullAllowed, Export("queryString")] + string QueryString { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable url; + [NullAllowed, Export("url")] + string Url { get; set; } +} + +// @interface SentrySamplingContext : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentrySamplingContext +{ + // @property (readonly, nonatomic) SentryTransactionContext * _Nonnull transactionContext; + [Export("transactionContext")] + SentryTransactionContext TransactionContext { get; } + + // @property (readonly, nonatomic) NSDictionary * _Nullable customSamplingContext; + [NullAllowed, Export("customSamplingContext")] + NSDictionary CustomSamplingContext { get; } + + // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext; + [Export("initWithTransactionContext:")] + NativeHandle Constructor(SentryTransactionContext transactionContext); + + // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; + [Export("initWithTransactionContext:customSamplingContext:")] + NativeHandle Constructor(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); +} + +// @interface SentrySpanContext : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentrySpanContext : SentrySerializable +{ + // @property (readonly, nonatomic) SentryId * _Nonnull traceId; + [Export("traceId")] + SentryId TraceId { get; } + + // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; + [Export("spanId")] + SentrySpanId SpanId { get; } + + // @property (readonly, nonatomic) SentrySpanId * _Nullable parentSpanId; + [NullAllowed, Export("parentSpanId")] + SentrySpanId ParentSpanId { get; } + + // @property (readonly, nonatomic) SentrySampleDecision sampled; + [Export("sampled")] + SentrySampleDecision Sampled { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nonnull operation; + [Export("operation")] + string Operation { get; } + + // @property (readonly, copy, nonatomic) NSString * _Nullable spanDescription; + [NullAllowed, Export("spanDescription")] + string SpanDescription { get; } + + // @property (copy, nonatomic) NSString * _Nonnull origin; + [Export("origin")] + string Origin { get; set; } + + // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation; + [Export("initWithOperation:")] + NativeHandle Constructor(string operation); + + // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled; + [Export("initWithOperation:sampled:")] + NativeHandle Constructor(string operation, SentrySampleDecision sampled); + + // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentId:(SentrySpanId * _Nullable)parentId operation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled; + [Export("initWithTraceId:spanId:parentId:operation:sampled:")] + NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, SentrySampleDecision sampled); + + // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentId:(SentrySpanId * _Nullable)parentId operation:(NSString * _Nonnull)operation spanDescription:(NSString * _Nullable)description sampled:(SentrySampleDecision)sampled; + [Export("initWithTraceId:spanId:parentId:operation:spanDescription:sampled:")] + NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, [NullAllowed] string description, SentrySampleDecision sampled); +} + +// @protocol SentrySpan +[Protocol] +[Internal] +[Model] +[BaseType (typeof(NSObject))] +interface SentrySpan : SentrySerializable +{ + // @required @property (nonatomic, strong) SentryId * _Nonnull traceId; + [Abstract] + [Export("traceId", ArgumentSemantic.Strong)] + SentryId TraceId { get; set; } + + // @required @property (nonatomic, strong) SentrySpanId * _Nonnull spanId; + [Abstract] + [Export("spanId", ArgumentSemantic.Strong)] + SentrySpanId SpanId { get; set; } + + // @required @property (nonatomic, strong) SentrySpanId * _Nullable parentSpanId; + [Abstract] + [NullAllowed, Export("parentSpanId", ArgumentSemantic.Strong)] + SentrySpanId ParentSpanId { get; set; } + + // @required @property (nonatomic) SentrySampleDecision sampled; + [Abstract] + [Export("sampled", ArgumentSemantic.Assign)] + SentrySampleDecision Sampled { get; set; } + + // @required @property (copy, nonatomic) NSString * _Nonnull operation; + [Abstract] + [Export("operation")] + string Operation { get; set; } + + // @required @property (copy, nonatomic) NSString * _Nonnull origin; + [Abstract] + [Export("origin")] + string Origin { get; set; } + + // @required @property (copy, nonatomic) NSString * _Nullable spanDescription; + [Abstract] + [NullAllowed, Export("spanDescription")] + string SpanDescription { get; set; } + + // @required @property (nonatomic) SentrySpanStatus status; + [Abstract] + [Export("status", ArgumentSemantic.Assign)] + SentrySpanStatus Status { get; set; } + + // @required @property (nonatomic, strong) NSDate * _Nullable timestamp; + [Abstract] + [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] + NSDate Timestamp { get; set; } + + // @required @property (nonatomic, strong) NSDate * _Nullable startTimestamp; + [Abstract] + [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] + NSDate StartTimestamp { get; set; } + + // @required @property (readonly) NSDictionary * _Nonnull data; + [Abstract] + [Export("data")] + NSDictionary Data { get; } + + // @required @property (readonly) NSDictionary * _Nonnull tags; + [Abstract] + [Export("tags")] + NSDictionary Tags { get; } + + // @required @property (readonly) BOOL isFinished; + [Abstract] + [Export("isFinished")] + bool IsFinished { get; } + + // @required @property (readonly, nonatomic) SentryTraceContext * _Nullable traceContext; + [Abstract] + [NullAllowed, Export("traceContext")] + SentryTraceContext TraceContext { get; } + + // @required -(id _Nonnull)startChildWithOperation:(NSString * _Nonnull)operation __attribute__((swift_name("startChild(operation:)"))); + [Abstract] + [Export("startChildWithOperation:")] + SentrySpan StartChildWithOperation(string operation); + + // @required -(id _Nonnull)startChildWithOperation:(NSString * _Nonnull)operation description:(NSString * _Nullable)description __attribute__((swift_name("startChild(operation:description:)"))); + [Abstract] + [Export("startChildWithOperation:description:")] + SentrySpan StartChildWithOperation(string operation, [NullAllowed] string description); + + // @required -(void)setDataValue:(id _Nullable)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setData(value:key:)"))); + [Abstract] + [Export("setDataValue:forKey:")] + void SetDataValue([NullAllowed] NSObject value, string key); - // @property (copy, nonatomic) NSString * _Nonnull environment; - [Export("environment")] - string Environment { get; set; } + // @required -(void)removeDataForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeData(key:)"))); + [Abstract] + [Export("removeDataForKey:")] + void RemoveDataForKey(string key); - // @property (assign, nonatomic) BOOL enabled; - [Export("enabled")] - bool Enabled { get; set; } + // @required -(void)setTagValue:(NSString * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setTag(value:key:)"))); + [Abstract] + [Export("setTagValue:forKey:")] + void SetTagValue(string value, string key); - // @property (assign, nonatomic) NSTimeInterval shutdownTimeInterval; - [Export("shutdownTimeInterval")] - double ShutdownTimeInterval { get; set; } + // @required -(void)removeTagForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeTag(key:)"))); + [Abstract] + [Export("removeTagForKey:")] + void RemoveTagForKey(string key); - // @property (assign, nonatomic) BOOL enableCrashHandler; - [Export("enableCrashHandler")] - bool EnableCrashHandler { get; set; } + // @required -(void)setMeasurement:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value __attribute__((swift_name("setMeasurement(name:value:)"))); + [Abstract] + [Export("setMeasurement:value:")] + void SetMeasurement(string name, NSNumber value); - // @property (assign, nonatomic) BOOL enableSigtermReporting; - [Export("enableSigtermReporting")] - bool EnableSigtermReporting { get; set; } + // @required -(void)setMeasurement:(NSString * _Nonnull)name value:(NSNumber * _Nonnull)value unit:(SentryMeasurementUnit * _Nonnull)unit __attribute__((swift_name("setMeasurement(name:value:unit:)"))); + [Abstract] + [Export("setMeasurement:value:unit:")] + void SetMeasurement(string name, NSNumber value, SentryMeasurementUnit unit); - // @property (assign, nonatomic) NSUInteger maxBreadcrumbs; - [Export("maxBreadcrumbs")] - nuint MaxBreadcrumbs { get; set; } + // @required -(void)finish; + [Abstract] + [Export("finish")] + void Finish(); - // @property (assign, nonatomic) BOOL enableNetworkBreadcrumbs; - [Export("enableNetworkBreadcrumbs")] - bool EnableNetworkBreadcrumbs { get; set; } + // @required -(void)finishWithStatus:(SentrySpanStatus)status __attribute__((swift_name("finish(status:)"))); + [Abstract] + [Export("finishWithStatus:")] + void FinishWithStatus(SentrySpanStatus status); - // @property (assign, nonatomic) NSUInteger maxCacheItems; - [Export("maxCacheItems")] - nuint MaxCacheItems { get; set; } + // @required -(SentryTraceHeader * _Nonnull)toTraceHeader; + [Abstract] + [Export("toTraceHeader")] + SentryTraceHeader ToTraceHeader(); - // @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend; - [NullAllowed, Export("beforeSend", ArgumentSemantic.Copy)] - SentryBeforeSendEventCallback BeforeSend { get; set; } + // @required -(NSString * _Nullable)baggageHttpHeader; + [Abstract] + [NullAllowed, Export("baggageHttpHeader")] + string BaggageHttpHeader { get; } - // @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan; - [NullAllowed, Export("beforeSendSpan", ArgumentSemantic.Copy)] - SentryBeforeSendSpanCallback BeforeSendSpan { get; set; } + // @required -(NSDictionary * _Nonnull)serialize; + [Abstract] + [Export("serialize")] + NSDictionary Serialize(); +} - // @property (copy, nonatomic) SentryBeforeSendLogCallback _Nullable beforeSendLog; - [NullAllowed, Export("beforeSendLog", ArgumentSemantic.Copy)] - SentryBeforeSendLogCallback BeforeSendLog { get; set; } +// @interface SentryScope : NSObject +[BaseType(typeof(NSObject))] +[Internal] +partial interface SentryScope : SentrySerializable +{ + // @property (nonatomic, strong) id _Nullable span; + [NullAllowed, Export("span", ArgumentSemantic.Strong)] + SentrySpan Span { get; set; } - // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb; - [NullAllowed, Export("beforeBreadcrumb", ArgumentSemantic.Copy)] - SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; } + // @property (nonatomic, strong) NSString * _Nullable replayId; + [NullAllowed, Export("replayId", ArgumentSemantic.Strong)] + string ReplayId { get; set; } - // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureScreenshot; - [NullAllowed, Export("beforeCaptureScreenshot", ArgumentSemantic.Copy)] - SentryBeforeCaptureScreenshotCallback BeforeCaptureScreenshot { get; set; } + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull tags; + [Export("tags", ArgumentSemantic.Copy)] + NSDictionary Tags { get; } - // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureViewHierarchy; - [NullAllowed, Export("beforeCaptureViewHierarchy", ArgumentSemantic.Copy)] - SentryBeforeCaptureScreenshotCallback BeforeCaptureViewHierarchy { get; set; } + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull attributes; + [Export("attributes", ArgumentSemantic.Copy)] + NSDictionary Attributes { get; } - // @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun; - [NullAllowed, Export("onCrashedLastRun", ArgumentSemantic.Copy)] - SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; } + // -(instancetype _Nonnull)initWithMaxBreadcrumbs:(NSInteger)maxBreadcrumbs __attribute__((objc_designated_initializer)); + [Export("initWithMaxBreadcrumbs:")] + [DesignatedInitializer] + NativeHandle Constructor(nint maxBreadcrumbs); - // @property (copy, nonatomic) DEPRECATED_MSG_ATTRIBUTE("Setting `SentryOptions.integrations` is deprecated. Integrations should be enabled or disabled using their respective `SentryOptions.enable*` property.") NSArray * integrations __attribute__((deprecated("Setting `SentryOptions.integrations` is deprecated. Integrations should be enabled or disabled using their respective `SentryOptions.enable*` property."))); - [Export("integrations", ArgumentSemantic.Copy)] - string[] Integrations { get; set; } + // -(instancetype _Nonnull)initWithScope:(SentryScope * _Nonnull)scope; + [Export("initWithScope:")] + NativeHandle Constructor(SentryScope scope); - // +(NSArray * _Nonnull)defaultIntegrations; - [Static] - [Export("defaultIntegrations")] - string[] DefaultIntegrations { get; } + // -(void)setUser:(SentryUser * _Nullable)user; + [Export("setUser:")] + void SetUser([NullAllowed] SentryUser user); - // @property (copy, nonatomic) NSNumber * _Nullable sampleRate; - [NullAllowed, Export("sampleRate", ArgumentSemantic.Copy)] - NSNumber SampleRate { get; set; } + // -(void)setTagValue:(NSString * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setTag(value:key:)"))); + [Export("setTagValue:forKey:")] + void SetTagValue(string value, string key); - // @property (assign, nonatomic) BOOL enableAutoSessionTracking; - [Export("enableAutoSessionTracking")] - bool EnableAutoSessionTracking { get; set; } + // -(void)removeTagForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeTag(key:)"))); + [Export("removeTagForKey:")] + void RemoveTagForKey(string key); - // @property (assign, nonatomic) BOOL enableGraphQLOperationTracking; - [Export("enableGraphQLOperationTracking")] - bool EnableGraphQLOperationTracking { get; set; } + // -(void)setTags:(NSDictionary * _Nullable)tags; + [Export("setTags:")] + void SetTags([NullAllowed] NSDictionary tags); - // @property (assign, nonatomic) BOOL enableWatchdogTerminationTracking; - [Export("enableWatchdogTerminationTracking")] - bool EnableWatchdogTerminationTracking { get; set; } + // -(void)setExtras:(NSDictionary * _Nullable)extras; + [Export("setExtras:")] + void SetExtras([NullAllowed] NSDictionary extras); - // @property (assign, nonatomic) NSUInteger sessionTrackingIntervalMillis; - [Export("sessionTrackingIntervalMillis")] - nuint SessionTrackingIntervalMillis { get; set; } + // -(void)setExtraValue:(id _Nullable)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setExtra(value:key:)"))); + [Export("setExtraValue:forKey:")] + void SetExtraValue([NullAllowed] NSObject value, string key); - // @property (assign, nonatomic) BOOL attachStacktrace; - [Export("attachStacktrace")] - bool AttachStacktrace { get; set; } + // -(void)removeExtraForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeExtra(key:)"))); + [Export("removeExtraForKey:")] + void RemoveExtraForKey(string key); - // @property (assign, nonatomic) NSUInteger maxAttachmentSize; - [Export("maxAttachmentSize")] - nuint MaxAttachmentSize { get; set; } + // -(void)setDist:(NSString * _Nullable)dist; + [Export("setDist:")] + void SetDist([NullAllowed] string dist); - // @property (assign, nonatomic) BOOL sendDefaultPii; - [Export("sendDefaultPii")] - bool SendDefaultPii { get; set; } + // -(void)setEnvironment:(NSString * _Nullable)environment; + [Export("setEnvironment:")] + void SetEnvironment([NullAllowed] string environment); - // @property (assign, nonatomic) BOOL enableAutoPerformanceTracing; - [Export("enableAutoPerformanceTracing")] - bool EnableAutoPerformanceTracing { get; set; } + // -(void)setFingerprint:(NSArray * _Nullable)fingerprint; + [Export("setFingerprint:")] + void SetFingerprint([NullAllowed] string[] fingerprint); - // @property (assign, nonatomic) BOOL enablePerformanceV2; - [Export("enablePerformanceV2")] - bool EnablePerformanceV2 { get; set; } + // -(void)setLevel:(SentryLevel)level; + [Export("setLevel:")] + void SetLevel(SentryLevel level); - // @property (assign, nonatomic) BOOL enablePersistingTracesWhenCrashing; - [Export("enablePersistingTracesWhenCrashing")] - bool EnablePersistingTracesWhenCrashing { get; set; } + // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb __attribute__((swift_name("addBreadcrumb(_:)"))); + [Export("addBreadcrumb:")] + void AddBreadcrumb(SentryBreadcrumb crumb); - // @property (nonatomic) SentryScope * _Nonnull (^ _Nonnull)(SentryScope * _Nonnull) initialScope; - [Export("initialScope", ArgumentSemantic.Assign)] - Func InitialScope { get; set; } + // -(void)clearBreadcrumbs; + [Export("clearBreadcrumbs")] + void ClearBreadcrumbs(); - // @property (assign, nonatomic) BOOL enableUIViewControllerTracing; - [Export("enableUIViewControllerTracing")] - bool EnableUIViewControllerTracing { get; set; } + // -(NSDictionary * _Nonnull)serialize; + [Export("serialize")] + NSDictionary Serialize(); - // @property (assign, nonatomic) BOOL attachScreenshot; - [Export("attachScreenshot")] - bool AttachScreenshot { get; set; } + // -(void)setContextValue:(NSDictionary * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setContext(value:key:)"))); + [Export("setContextValue:forKey:")] + void SetContextValue(NSDictionary value, string key); - // @property (nonatomic, strong) SentryViewScreenshotOptions * _Nonnull screenshot; - [Export("screenshot", ArgumentSemantic.Strong)] - SentryViewScreenshotOptions Screenshot { get; set; } + // -(void)removeContextForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeContext(key:)"))); + [Export("removeContextForKey:")] + void RemoveContextForKey(string key); - // @property (assign, nonatomic) BOOL attachViewHierarchy; - [Export("attachViewHierarchy")] - bool AttachViewHierarchy { get; set; } + // -(void)addAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((swift_name("addAttachment(_:)"))); + [Export("addAttachment:")] + void AddAttachment(SentryAttachment attachment); - // @property (assign, nonatomic) BOOL reportAccessibilityIdentifier; - [Export("reportAccessibilityIdentifier")] - bool ReportAccessibilityIdentifier { get; set; } + // -(void)setAttributeValue:(id _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setAttribute(value:key:)"))); + [Export("setAttributeValue:forKey:")] + void SetAttributeValue(NSObject value, string key); - // @property (assign, nonatomic) BOOL enableUserInteractionTracing; - [Export("enableUserInteractionTracing")] - bool EnableUserInteractionTracing { get; set; } + // -(void)removeAttributeForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeAttribute(key:)"))); + [Export("removeAttributeForKey:")] + void RemoveAttributeForKey(string key); - // @property (assign, nonatomic) NSTimeInterval idleTimeout; - [Export("idleTimeout")] - double IdleTimeout { get; set; } + // -(void)clearAttachments; + [Export("clearAttachments")] + void ClearAttachments(); - // @property (assign, nonatomic) BOOL enablePreWarmedAppStartTracing; - [Export("enablePreWarmedAppStartTracing")] - bool EnablePreWarmedAppStartTracing { get; set; } + // -(void)clear; + [Export("clear")] + void Clear(); +} - // @property (nonatomic, strong) SentryReplayOptions * _Nonnull sessionReplay; - [Export("sessionReplay", ArgumentSemantic.Strong)] - SentryReplayOptions SessionReplay { get; set; } +// @interface SentrySpanId : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentrySpanId +{ + // -(instancetype _Nonnull)initWithUUID:(NSUUID * _Nonnull)uuid; + [Export("initWithUUID:")] + NativeHandle Constructor(NSUuid uuid); - // @property (assign, nonatomic) BOOL enableNetworkTracking; - [Export("enableNetworkTracking")] - bool EnableNetworkTracking { get; set; } + // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value; + [Export("initWithValue:")] + NativeHandle Constructor(string value); - // @property (assign, nonatomic) BOOL enableFileIOTracing; - [Export("enableFileIOTracing")] - bool EnableFileIOTracing { get; set; } + // @property (readonly, copy) NSString * _Nonnull sentrySpanIdString; + [Export("sentrySpanIdString")] + string SentrySpanIdString { get; } - // @property (nonatomic) BOOL enableTracing __attribute__((deprecated("Use tracesSampleRate or tracesSampler instead"))); - [Export("enableTracing")] - bool EnableTracing { get; set; } + // @property (readonly, nonatomic, strong, class) SentrySpanId * _Nonnull empty; + [Static] + [Export("empty", ArgumentSemantic.Strong)] + SentrySpanId Empty { get; } +} - // @property (nonatomic, strong) NSNumber * _Nullable tracesSampleRate; - [NullAllowed, Export("tracesSampleRate", ArgumentSemantic.Strong)] - NSNumber TracesSampleRate { get; set; } +// @interface SentryStacktrace : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryStacktrace : SentrySerializable +{ + // @property (nonatomic, strong) NSArray * _Nonnull frames; + [Export("frames", ArgumentSemantic.Strong)] + SentryFrame[] Frames { get; set; } - // @property (nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler; - [NullAllowed, Export("tracesSampler", ArgumentSemantic.Assign)] - SentryTracesSamplerCallback TracesSampler { get; set; } + // @property (nonatomic, strong) NSDictionary * _Nonnull registers; + [Export("registers", ArgumentSemantic.Strong)] + NSDictionary Registers { get; set; } - // @property (readonly, assign, nonatomic) BOOL isTracingEnabled; - [Export("isTracingEnabled")] - bool IsTracingEnabled { get; } + // @property (copy, nonatomic) NSNumber * _Nullable snapshot; + [NullAllowed, Export("snapshot", ArgumentSemantic.Copy)] + NSNumber Snapshot { get; set; } - // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppIncludes; - [Export("inAppIncludes", ArgumentSemantic.Copy)] - string[] InAppIncludes { get; } + // -(instancetype _Nonnull)initWithFrames:(NSArray * _Nonnull)frames registers:(NSDictionary * _Nonnull)registers; + [Export("initWithFrames:registers:")] + NativeHandle Constructor(SentryFrame[] frames, NSDictionary registers); - // -(void)addInAppInclude:(NSString * _Nonnull)inAppInclude; - [Export("addInAppInclude:")] - void AddInAppInclude(string inAppInclude); + // -(void)fixDuplicateFrames; + [Export("fixDuplicateFrames")] + void FixDuplicateFrames(); +} - // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppExcludes; - [Export("inAppExcludes", ArgumentSemantic.Copy)] - string[] InAppExcludes { get; } +// @interface SentryThread : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryThread : SentrySerializable +{ + // @property (copy, nonatomic) NSNumber * _Nullable threadId; + [NullAllowed, Export("threadId", ArgumentSemantic.Copy)] + NSNumber ThreadId { get; set; } - // -(void)addInAppExclude:(NSString * _Nonnull)inAppExclude; - [Export("addInAppExclude:")] - void AddInAppExclude(string inAppExclude); + // @property (copy, nonatomic) NSString * _Nullable name; + [NullAllowed, Export("name")] + string Name { get; set; } - [Wrap("WeakUrlSessionDelegate")] - [NullAllowed] - NSUrlSessionDelegate UrlSessionDelegate { get; set; } + // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; + [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] + SentryStacktrace Stacktrace { get; set; } - // @property (nonatomic, weak) id _Nullable urlSessionDelegate; - [NullAllowed, Export("urlSessionDelegate", ArgumentSemantic.Weak)] - NSObject WeakUrlSessionDelegate { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable crashed; + [NullAllowed, Export("crashed", ArgumentSemantic.Copy)] + NSNumber Crashed { get; set; } - // @property (nonatomic, strong) NSURLSession * _Nullable urlSession; - [NullAllowed, Export("urlSession", ArgumentSemantic.Strong)] - NSUrlSession UrlSession { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable current; + [NullAllowed, Export("current", ArgumentSemantic.Copy)] + NSNumber Current { get; set; } - // @property (assign, nonatomic) BOOL enableSwizzling; - [Export("enableSwizzling")] - bool EnableSwizzling { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable isMain; + [NullAllowed, Export("isMain", ArgumentSemantic.Copy)] + NSNumber IsMain { get; set; } - // @property (nonatomic, strong) NSSet * _Nonnull swizzleClassNameExcludes; - [Export("swizzleClassNameExcludes", ArgumentSemantic.Strong)] - NSSet SwizzleClassNameExcludes { get; set; } + // -(instancetype _Nonnull)initWithThreadId:(NSNumber * _Nullable)threadId; + [Export("initWithThreadId:")] + NativeHandle Constructor([NullAllowed] NSNumber threadId); +} - // @property (assign, nonatomic) BOOL enableCoreDataTracing; - [Export("enableCoreDataTracing")] - bool EnableCoreDataTracing { get; set; } +// @interface SentryTraceContext : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentryTraceContext : SentrySerializable +{ + // @property (readonly, nonatomic) SentryId * _Nonnull traceId; + [Export("traceId")] + SentryId TraceId { get; } - // @property (copy, nonatomic) SentryProfilingConfigurationBlock _Nullable configureProfiling; - [NullAllowed, Export("configureProfiling", ArgumentSemantic.Copy)] - SentryProfilingConfigurationBlock ConfigureProfiling { get; set; } + // @property (readonly, nonatomic) NSString * _Nonnull publicKey; + [Export("publicKey")] + string PublicKey { get; } - // @property (assign, nonatomic) BOOL enableAppLaunchProfiling __attribute__((deprecated("This property is deprecated and will be removed in a future version of the SDK. See SentryProfileOptions.startOnAppStart and SentryProfileOptions.lifecycle"))); - [Export("enableAppLaunchProfiling")] - bool EnableAppLaunchProfiling { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable releaseName; + [NullAllowed, Export("releaseName")] + string ReleaseName { get; } - // @property (nonatomic, strong) DEPRECATED_MSG_ATTRIBUTE("This property is deprecated and will be removed in a future version of the SDK. See SentryProfileOptions.sessionSampleRate") NSNumber * profilesSampleRate __attribute__((deprecated("This property is deprecated and will be removed in a future version of the SDK. See SentryProfileOptions.sessionSampleRate"))); - [Export("profilesSampleRate", ArgumentSemantic.Strong)] - NSNumber ProfilesSampleRate { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable environment; + [NullAllowed, Export("environment")] + string Environment { get; } - // @property (nonatomic) DEPRECATED_MSG_ATTRIBUTE("This property is deprecated and will be removed in a future version of the SDK. See SentryProfileOptions.sessionSampleRate") SentryTracesSamplerCallback profilesSampler __attribute__((deprecated("This property is deprecated and will be removed in a future version of the SDK. See SentryProfileOptions.sessionSampleRate"))); - [Export("profilesSampler", ArgumentSemantic.Assign)] - SentryTracesSamplerCallback ProfilesSampler { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable transaction; + [NullAllowed, Export("transaction")] + string Transaction { get; } - // @property (readonly, assign, nonatomic) BOOL isProfilingEnabled __attribute__((deprecated("This property is deprecated and will be removed in a future version of the SDK"))); - [Export("isProfilingEnabled")] - bool IsProfilingEnabled { get; } + // @property (readonly, nonatomic) NSString * _Nullable sampleRate; + [NullAllowed, Export("sampleRate")] + string SampleRate { get; } - // @property (assign, nonatomic) BOOL enableProfiling __attribute__((deprecated("Use profilesSampleRate or profilesSampler instead. This property will be removed in a future version of the SDK"))); - [Export("enableProfiling")] - bool EnableProfiling { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable sampleRand; + [NullAllowed, Export("sampleRand")] + string SampleRand { get; } - // @property (assign, nonatomic) BOOL sendClientReports; - [Export("sendClientReports")] - bool SendClientReports { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable sampled; + [NullAllowed, Export("sampled")] + string Sampled { get; } - // @property (assign, nonatomic) BOOL enableAppHangTracking; - [Export("enableAppHangTracking")] - bool EnableAppHangTracking { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable replayId; + [NullAllowed, Export("replayId")] + string ReplayId { get; } - // @property (assign, nonatomic) BOOL enableAppHangTrackingV2; - [Export("enableAppHangTrackingV2")] - bool EnableAppHangTrackingV2 { get; set; } + // -(SentryBaggage * _Nonnull)toBaggage; + [Export("toBaggage")] + SentryBaggage ToBaggage(); +} - // @property (assign, nonatomic) BOOL enableReportNonFullyBlockingAppHangs; - [Export("enableReportNonFullyBlockingAppHangs")] - bool EnableReportNonFullyBlockingAppHangs { get; set; } +// @interface SentryTraceHeader : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryTraceHeader +{ + // @property (readonly, nonatomic) SentryId * _Nonnull traceId; + [Export("traceId")] + SentryId TraceId { get; } - // @property (assign, nonatomic) NSTimeInterval appHangTimeoutInterval; - [Export("appHangTimeoutInterval")] - double AppHangTimeoutInterval { get; set; } + // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; + [Export("spanId")] + SentrySpanId SpanId { get; } - // @property (assign, nonatomic) BOOL enableAutoBreadcrumbTracking; - [Export("enableAutoBreadcrumbTracking")] - bool EnableAutoBreadcrumbTracking { get; set; } + // @property (readonly, nonatomic) SentrySampleDecision sampled; + [Export("sampled")] + SentrySampleDecision Sampled { get; } - // @property (retain, nonatomic) NSArray * _Nonnull tracePropagationTargets; - [Export("tracePropagationTargets", ArgumentSemantic.Retain)] - NSObject[] TracePropagationTargets { get; set; } + // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId sampled:(SentrySampleDecision)sampled; + [Export("initWithTraceId:spanId:sampled:")] + NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, SentrySampleDecision sampled); - // @property (assign, nonatomic) BOOL enableCaptureFailedRequests; - [Export("enableCaptureFailedRequests")] - bool EnableCaptureFailedRequests { get; set; } + // -(NSString * _Nonnull)value; + [Export("value")] + string Value { get; } +} - // @property (nonatomic, strong) NSArray * _Nonnull failedRequestStatusCodes; - [Export("failedRequestStatusCodes", ArgumentSemantic.Strong)] - SentryHttpStatusCodeRange[] FailedRequestStatusCodes { get; set; } +// @interface SentryTransactionContext : SentrySpanContext +[BaseType(typeof(SentrySpanContext))] +[DisableDefaultCtor] +[Internal] +interface SentryTransactionContext +{ + // @property (readonly, nonatomic) NSString * _Nonnull name; + [Export("name")] + string Name { get; } - // @property (nonatomic, strong) NSArray * _Nonnull failedRequestTargets; - [Export("failedRequestTargets", ArgumentSemantic.Strong)] - NSObject[] FailedRequestTargets { get; set; } + // @property (readonly, nonatomic) SentryTransactionNameSource nameSource; + [Export("nameSource")] + SentryTransactionNameSource NameSource { get; } - // @property (assign, nonatomic) BOOL enableMetricKit __attribute__((availability(ios, introduced=15.0))) __attribute__((availability(macos, introduced=12.0))) __attribute__((availability(maccatalyst, introduced=15.0))) __attribute__((availability(tvos, unavailable))) __attribute__((availability(watchos, unavailable))); - [NoWatch, NoTV, MacCatalyst(15, 0)] - [Export("enableMetricKit")] - bool EnableMetricKit { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable sampleRate; + [NullAllowed, Export("sampleRate", ArgumentSemantic.Strong)] + NSNumber SampleRate { get; set; } - // @property (assign, nonatomic) BOOL enableMetricKitRawPayload __attribute__((availability(ios, introduced=15.0))) __attribute__((availability(macos, introduced=12.0))) __attribute__((availability(maccatalyst, introduced=15.0))) __attribute__((availability(tvos, unavailable))) __attribute__((availability(watchos, unavailable))); - [NoWatch, NoTV, MacCatalyst(15, 0)] - [Export("enableMetricKitRawPayload")] - bool EnableMetricKitRawPayload { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable sampleRand; + [NullAllowed, Export("sampleRand", ArgumentSemantic.Strong)] + NSNumber SampleRand { get; set; } - // @property (nonatomic) BOOL enableTimeToFullDisplayTracing; - [Export("enableTimeToFullDisplayTracing")] - bool EnableTimeToFullDisplayTracing { get; set; } + // @property (nonatomic) SentrySampleDecision parentSampled; + [Export("parentSampled", ArgumentSemantic.Assign)] + SentrySampleDecision ParentSampled { get; set; } - // @property (assign, nonatomic) BOOL swiftAsyncStacktraces; - [Export("swiftAsyncStacktraces")] - bool SwiftAsyncStacktraces { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRate; + [NullAllowed, Export("parentSampleRate", ArgumentSemantic.Strong)] + NSNumber ParentSampleRate { get; set; } - // @property (copy, nonatomic) NSString * _Nonnull cacheDirectoryPath; - [Export("cacheDirectoryPath")] - string CacheDirectoryPath { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRand; + [NullAllowed, Export("parentSampleRand", ArgumentSemantic.Strong)] + NSNumber ParentSampleRand { get; set; } - // @property (assign, nonatomic) BOOL enableSpotlight; - [Export("enableSpotlight")] - bool EnableSpotlight { get; set; } + // @property (assign, nonatomic) BOOL forNextAppLaunch; + [Export("forNextAppLaunch")] + bool ForNextAppLaunch { get; set; } - // @property (copy, nonatomic) NSString * _Nonnull spotlightUrl; - [Export("spotlightUrl")] - string SpotlightUrl { get; set; } + // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; + [Export("initWithName:operation:")] + NativeHandle Constructor(string name, string operation); - // @property (readonly, nonatomic) NSObject * _Nonnull _swiftExperimentalOptions; - [Export("_swiftExperimentalOptions")] - SentryExperimentalOptions Experimental { get; } -} + // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled sampleRate:(NSNumber * _Nullable)sampleRate sampleRand:(NSNumber * _Nullable)sampleRand; + [Export("initWithName:operation:sampled:sampleRate:sampleRand:")] + NativeHandle Constructor(string name, string operation, SentrySampleDecision sampled, [NullAllowed] NSNumber sampleRate, [NullAllowed] NSNumber sampleRand); -// typedef void (^SentryProfilingConfigurationBlock)(SentryProfileOptions * _Nonnull); -[Internal] -delegate void SentryProfilingConfigurationBlock(SentryProfileOptions options); + // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation traceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentSpanId:(SentrySpanId * _Nullable)parentSpanId parentSampled:(SentrySampleDecision)parentSampled parentSampleRate:(NSNumber * _Nullable)parentSampleRate parentSampleRand:(NSNumber * _Nullable)parentSampleRand; + [Export("initWithName:operation:traceId:spanId:parentSpanId:parentSampled:parentSampleRate:parentSampleRand:")] + NativeHandle Constructor(string name, string operation, SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentSpanId, SentrySampleDecision parentSampled, [NullAllowed] NSNumber parentSampleRate, [NullAllowed] NSNumber parentSampleRand); +} -// @interface SentryReplayApi : NSObject +// @interface SentryUser : NSObject [BaseType(typeof(NSObject))] [Internal] -interface SentryReplayApi +interface SentryUser : SentrySerializable { - // -(void)maskView:(UIView * _Nonnull)view __attribute__((swift_name("maskView(_:)"))); - [Export("maskView:")] - void MaskView(UIView view); + // @property (copy, atomic) NSString * _Nullable userId; + [NullAllowed, Export("userId")] + string UserId { get; set; } - // -(void)unmaskView:(UIView * _Nonnull)view __attribute__((swift_name("unmaskView(_:)"))); - [Export("unmaskView:")] - void UnmaskView(UIView view); + // @property (copy, atomic) NSString * _Nullable email; + [NullAllowed, Export("email")] + string Email { get; set; } - // -(void)pause; - [Export("pause")] - void Pause(); + // @property (copy, atomic) NSString * _Nullable username; + [NullAllowed, Export("username")] + string Username { get; set; } - // -(void)resume; - [Export("resume")] - void Resume(); + // @property (copy, atomic) NSString * _Nullable ipAddress; + [NullAllowed, Export("ipAddress")] + string IpAddress { get; set; } - // -(void)start; - [Export("start")] - void Start(); + // @property (copy, atomic) NSString * _Nullable name; + [NullAllowed, Export("name")] + string Name { get; set; } - // -(void)stop; - [Export("stop")] - void Stop(); + // @property (nonatomic, strong) SentryGeo * _Nullable geo; + [NullAllowed, Export("geo", ArgumentSemantic.Strong)] + SentryGeo Geo { get; set; } - // -(void)showMaskPreview; - [Export("showMaskPreview")] - void ShowMaskPreview(); + // @property (atomic, strong) NSDictionary * _Nullable data; + [NullAllowed, Export("data", ArgumentSemantic.Strong)] + NSDictionary Data { get; set; } - // -(void)showMaskPreview:(CGFloat)opacity; - [Export("showMaskPreview:")] - void ShowMaskPreview(nfloat opacity); + // -(instancetype _Nonnull)initWithUserId:(NSString * _Nonnull)userId; + [Export("initWithUserId:")] + NativeHandle Constructor(string userId); - // -(void)hideMaskPreview; - [Export("hideMaskPreview")] - void HideMaskPreview(); + // -(BOOL)isEqualToUser:(SentryUser * _Nonnull)user; + [Export("isEqualToUser:")] + bool IsEqualToUser(SentryUser user); + + // -(NSUInteger)hash; + [Export("hash")] + nuint Hash { get; } } -// @interface SentryRequest : NSObject +// @interface SentryOptions : NSObject [BaseType(typeof(NSObject))] [Internal] -interface SentryRequest : SentrySerializable +interface SentryOptions { - // @property (copy, nonatomic) NSNumber * _Nullable bodySize; - [NullAllowed, Export("bodySize", ArgumentSemantic.Copy)] - NSNumber BodySize { get; set; } + // @property (copy, nonatomic) NSString * _Nullable dsn; + [NullAllowed, Export("dsn")] + string Dsn { get; set; } + + // @property (nonatomic, strong) SentryDsn * _Nullable parsedDsn; + [NullAllowed, Export("parsedDsn", ArgumentSemantic.Strong)] + SentryDsn ParsedDsn { get; set; } + + // @property (nonatomic) BOOL debug; + [Export("debug")] + bool Debug { get; set; } + + // @property (nonatomic) SentryLevel diagnosticLevel; + [Export("diagnosticLevel", ArgumentSemantic.Assign)] + SentryLevel DiagnosticLevel { get; set; } + + // @property (copy, nonatomic) NSString * _Nullable releaseName; + [NullAllowed, Export("releaseName")] + string ReleaseName { get; set; } - // @property (copy, nonatomic) NSString * _Nullable cookies; - [NullAllowed, Export("cookies")] - string Cookies { get; set; } + // @property (copy, nonatomic) NSString * _Nullable dist; + [NullAllowed, Export("dist")] + string Dist { get; set; } - // @property (nonatomic, strong) NSDictionary * _Nullable headers; - [NullAllowed, Export("headers", ArgumentSemantic.Strong)] - NSDictionary Headers { get; set; } + // @property (copy, nonatomic) NSString * _Nonnull environment; + [Export("environment")] + string Environment { get; set; } - // @property (copy, nonatomic) NSString * _Nullable fragment; - [NullAllowed, Export("fragment")] - string Fragment { get; set; } + // @property (nonatomic) BOOL enabled; + [Export("enabled")] + bool Enabled { get; set; } - // @property (copy, nonatomic) NSString * _Nullable method; - [NullAllowed, Export("method")] - string Method { get; set; } + // @property (nonatomic) NSTimeInterval shutdownTimeInterval; + [Export("shutdownTimeInterval")] + double ShutdownTimeInterval { get; set; } - // @property (copy, nonatomic) NSString * _Nullable queryString; - [NullAllowed, Export("queryString")] - string QueryString { get; set; } + // @property (nonatomic) BOOL enableCrashHandler; + [Export("enableCrashHandler")] + bool EnableCrashHandler { get; set; } - // @property (copy, nonatomic) NSString * _Nullable url; - [NullAllowed, Export("url")] - string Url { get; set; } -} + // @property (nonatomic) BOOL enableSigtermReporting; + [Export("enableSigtermReporting")] + bool EnableSigtermReporting { get; set; } -// @interface SentrySamplingContext : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentrySamplingContext -{ - // @property (readonly, nonatomic) SentryTransactionContext * _Nonnull transactionContext; - [Export("transactionContext")] - SentryTransactionContext TransactionContext { get; } + // @property (nonatomic) NSUInteger maxBreadcrumbs; + [Export("maxBreadcrumbs")] + nuint MaxBreadcrumbs { get; set; } - // @property (readonly, nonatomic) NSDictionary * _Nullable customSamplingContext; - [NullAllowed, Export("customSamplingContext")] - NSDictionary CustomSamplingContext { get; } + // @property (nonatomic) BOOL enableNetworkBreadcrumbs; + [Export("enableNetworkBreadcrumbs")] + bool EnableNetworkBreadcrumbs { get; set; } - // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext; - [Export("initWithTransactionContext:")] - NativeHandle Constructor(SentryTransactionContext transactionContext); + // @property (nonatomic) NSUInteger maxCacheItems; + [Export("maxCacheItems")] + nuint MaxCacheItems { get; set; } - // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; - [Export("initWithTransactionContext:customSamplingContext:")] - NativeHandle Constructor(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); -} + // @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend; + [NullAllowed, Export("beforeSend", ArgumentSemantic.Copy)] + SentryBeforeSendEventCallback BeforeSend { get; set; } -// @interface SentryScope : NSObject -[BaseType(typeof(NSObject))] -[Internal] -partial interface SentryScope : SentrySerializable -{ - // @property (nonatomic, strong) id _Nullable span; - [NullAllowed, Export("span", ArgumentSemantic.Strong)] - SentrySpan Span { get; set; } + // @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan; + [NullAllowed, Export("beforeSendSpan", ArgumentSemantic.Copy)] + SentryBeforeSendSpanCallback BeforeSendSpan { get; set; } - // @property (nonatomic, strong) NSString * _Nullable replayId; - [NullAllowed, Export("replayId", ArgumentSemantic.Strong)] - string ReplayId { get; set; } + // @property (nonatomic) BOOL enableLogs; + [Export("enableLogs")] + bool EnableLogs { get; set; } - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull tags; - [Export("tags", ArgumentSemantic.Copy)] - NSDictionary Tags { get; } + // @property (copy, nonatomic) SentryLog * _Nullable (^ _Nullable)(SentryLog * _Nonnull) beforeSendLog; + [NullAllowed, Export("beforeSendLog", ArgumentSemantic.Copy)] + Func BeforeSendLog { get; set; } - // -(instancetype _Nonnull)initWithMaxBreadcrumbs:(NSInteger)maxBreadcrumbs __attribute__((objc_designated_initializer)); - [Export("initWithMaxBreadcrumbs:")] - [DesignatedInitializer] - NativeHandle Constructor(nint maxBreadcrumbs); + // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb; + [NullAllowed, Export("beforeBreadcrumb", ArgumentSemantic.Copy)] + SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; } - // -(instancetype _Nonnull)initWithScope:(SentryScope * _Nonnull)scope; - [Export("initWithScope:")] - NativeHandle Constructor(SentryScope scope); + // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureScreenshot; + [NullAllowed, Export("beforeCaptureScreenshot", ArgumentSemantic.Copy)] + SentryBeforeCaptureScreenshotCallback BeforeCaptureScreenshot { get; set; } - // -(void)setUser:(SentryUser * _Nullable)user; - [Export("setUser:")] - void SetUser([NullAllowed] SentryUser user); + // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureViewHierarchy; + [NullAllowed, Export("beforeCaptureViewHierarchy", ArgumentSemantic.Copy)] + SentryBeforeCaptureScreenshotCallback BeforeCaptureViewHierarchy { get; set; } - // -(void)setTagValue:(NSString * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setTag(value:key:)"))); - [Export("setTagValue:forKey:")] - void SetTagValue(string value, string key); + // @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun; + [NullAllowed, Export("onCrashedLastRun", ArgumentSemantic.Copy)] + SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; } - // -(void)removeTagForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeTag(key:)"))); - [Export("removeTagForKey:")] - void RemoveTagForKey(string key); + // @property (nonatomic, strong) NSNumber * _Nullable sampleRate; + [NullAllowed, Export("sampleRate", ArgumentSemantic.Strong)] + NSNumber SampleRate { get; set; } - // -(void)setTags:(NSDictionary * _Nullable)tags; - [Export("setTags:")] - void SetTags([NullAllowed] NSDictionary tags); + // @property (nonatomic) BOOL enableAutoSessionTracking; + [Export("enableAutoSessionTracking")] + bool EnableAutoSessionTracking { get; set; } - // -(void)setExtras:(NSDictionary * _Nullable)extras; - [Export("setExtras:")] - void SetExtras([NullAllowed] NSDictionary extras); + // @property (nonatomic) BOOL enableGraphQLOperationTracking; + [Export("enableGraphQLOperationTracking")] + bool EnableGraphQLOperationTracking { get; set; } - // -(void)setExtraValue:(id _Nullable)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setExtra(value:key:)"))); - [Export("setExtraValue:forKey:")] - void SetExtraValue([NullAllowed] NSObject value, string key); + // @property (nonatomic) BOOL enableWatchdogTerminationTracking; + [Export("enableWatchdogTerminationTracking")] + bool EnableWatchdogTerminationTracking { get; set; } - // -(void)removeExtraForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeExtra(key:)"))); - [Export("removeExtraForKey:")] - void RemoveExtraForKey(string key); + // @property (nonatomic) NSUInteger sessionTrackingIntervalMillis; + [Export("sessionTrackingIntervalMillis")] + nuint SessionTrackingIntervalMillis { get; set; } - // -(void)setDist:(NSString * _Nullable)dist; - [Export("setDist:")] - void SetDist([NullAllowed] string dist); + // @property (nonatomic) BOOL attachStacktrace; + [Export("attachStacktrace")] + bool AttachStacktrace { get; set; } - // -(void)setEnvironment:(NSString * _Nullable)environment; - [Export("setEnvironment:")] - void SetEnvironment([NullAllowed] string environment); + // @property (nonatomic) NSUInteger maxAttachmentSize; + [Export("maxAttachmentSize")] + nuint MaxAttachmentSize { get; set; } - // -(void)setFingerprint:(NSArray * _Nullable)fingerprint; - [Export("setFingerprint:")] - void SetFingerprint([NullAllowed] string[] fingerprint); + // @property (nonatomic) BOOL sendDefaultPii; + [Export("sendDefaultPii")] + bool SendDefaultPii { get; set; } - // -(void)setLevel:(enum SentryLevel)level; - [Export("setLevel:")] - void SetLevel(SentryLevel level); + // @property (nonatomic) BOOL enableAutoPerformanceTracing; + [Export("enableAutoPerformanceTracing")] + bool EnableAutoPerformanceTracing { get; set; } - // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb __attribute__((swift_name("addBreadcrumb(_:)"))); - [Export("addBreadcrumb:")] - void AddBreadcrumb(SentryBreadcrumb crumb); + // @property (nonatomic) BOOL enablePersistingTracesWhenCrashing; + [Export("enablePersistingTracesWhenCrashing")] + bool EnablePersistingTracesWhenCrashing { get; set; } - // -(void)add:(SentryBreadcrumb * _Nonnull)crumb __attribute__((deprecated("use `addBreadcrumb` instead"))) __attribute__((swift_name("add(_:)"))); - [Export("add:")] - void Add(SentryBreadcrumb crumb); + // @property (copy, nonatomic) SentryScope * _Nonnull (^ _Nonnull)(SentryScope * _Nonnull) initialScope; + [Export("initialScope", ArgumentSemantic.Copy)] + Func InitialScope { get; set; } - // -(void)clearBreadcrumbs; - [Export("clearBreadcrumbs")] - void ClearBreadcrumbs(); + // @property (nonatomic) BOOL enableUIViewControllerTracing; + [Export("enableUIViewControllerTracing")] + bool EnableUIViewControllerTracing { get; set; } - // -(NSDictionary * _Nonnull)serialize; - [Export("serialize")] - NSDictionary Serialize(); + // @property (nonatomic) BOOL attachScreenshot; + [Export("attachScreenshot")] + bool AttachScreenshot { get; set; } - // -(void)setContextValue:(NSDictionary * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setContext(value:key:)"))); - [Export("setContextValue:forKey:")] - void SetContextValue(NSDictionary value, string key); + // @property (nonatomic, strong) SentryViewScreenshotOptions * _Nonnull screenshot; + [Export("screenshot", ArgumentSemantic.Strong)] + SentryViewScreenshotOptions Screenshot { get; set; } - // -(void)removeContextForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeContext(key:)"))); - [Export("removeContextForKey:")] - void RemoveContextForKey(string key); + // @property (nonatomic) BOOL attachViewHierarchy; + [Export("attachViewHierarchy")] + bool AttachViewHierarchy { get; set; } - // -(void)addAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((swift_name("addAttachment(_:)"))); - [Export("addAttachment:")] - void AddAttachment(SentryAttachment attachment); + // @property (nonatomic) BOOL reportAccessibilityIdentifier; + [Export("reportAccessibilityIdentifier")] + bool ReportAccessibilityIdentifier { get; set; } - // -(void)includeAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((deprecated("use `addAttachment` instead"))) __attribute__((swift_name("add(_:)"))); - [Export("includeAttachment:")] - void IncludeAttachment(SentryAttachment attachment); + // @property (nonatomic) BOOL enableUserInteractionTracing; + [Export("enableUserInteractionTracing")] + bool EnableUserInteractionTracing { get; set; } - // -(void)clearAttachments; - [Export("clearAttachments")] - void ClearAttachments(); + // @property (nonatomic) NSTimeInterval idleTimeout; + [Export("idleTimeout")] + double IdleTimeout { get; set; } - // -(void)clear; - [Export("clear")] - void Clear(); + // @property (nonatomic) BOOL enablePreWarmedAppStartTracing; + [Export("enablePreWarmedAppStartTracing")] + bool EnablePreWarmedAppStartTracing { get; set; } - // -(void)useSpan:(SentrySpanCallback _Nonnull)callback __attribute__((deprecated("This method was used to create an atomic block that could be used to mutate the current span. It is not atomic anymore and due to issues with memory safety in `NSBlock` it is now considered unsafe and deprecated. Use `span` instead."))); - [Export("useSpan:")] - void UseSpan(SentrySpanCallback callback); -} + // @property (nonatomic) BOOL enableReportNonFullyBlockingAppHangs; + [Export("enableReportNonFullyBlockingAppHangs")] + bool EnableReportNonFullyBlockingAppHangs { get; set; } -// @interface SentrySpanId : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentrySpanId -{ - // -(instancetype _Nonnull)initWithUUID:(NSUUID * _Nonnull)uuid; - [Export("initWithUUID:")] - NativeHandle Constructor(NSUuid uuid); + // -(BOOL)isAppHangTrackingDisabled __attribute__((warn_unused_result(""))); + [Export("isAppHangTrackingDisabled")] + bool IsAppHangTrackingDisabled { get; } - // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value; - [Export("initWithValue:")] - NativeHandle Constructor(string value); + // @property (nonatomic, strong) SentryReplayOptions * _Nonnull sessionReplay; + [Export("sessionReplay", ArgumentSemantic.Strong)] + SentryReplayOptions SessionReplay { get; set; } - // @property (readonly, copy) NSString * _Nonnull sentrySpanIdString; - [Export("sentrySpanIdString")] - string SentrySpanIdString { get; } + // @property (nonatomic) BOOL enableNetworkTracking; + [Export("enableNetworkTracking")] + bool EnableNetworkTracking { get; set; } - // @property (readonly, nonatomic, strong, class) SentrySpanId * _Nonnull empty; - [Static] - [Export("empty", ArgumentSemantic.Strong)] - SentrySpanId Empty { get; } -} + // @property (nonatomic) BOOL enableFileIOTracing; + [Export("enableFileIOTracing")] + bool EnableFileIOTracing { get; set; } -// @interface SentryStacktrace : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryStacktrace : SentrySerializable -{ - // @property (nonatomic, strong) NSArray * _Nonnull frames; - [Export("frames", ArgumentSemantic.Strong)] - SentryFrame[] Frames { get; set; } + // @property (nonatomic) BOOL enableDataSwizzling; + [Export("enableDataSwizzling")] + bool EnableDataSwizzling { get; set; } - // @property (nonatomic, strong) NSDictionary * _Nonnull registers; - [Export("registers", ArgumentSemantic.Strong)] - NSDictionary Registers { get; set; } + // @property (nonatomic) BOOL enableFileManagerSwizzling; + [Export("enableFileManagerSwizzling")] + bool EnableFileManagerSwizzling { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable snapshot; - [NullAllowed, Export("snapshot", ArgumentSemantic.Copy)] - NSNumber Snapshot { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable tracesSampleRate; + [NullAllowed, Export("tracesSampleRate", ArgumentSemantic.Strong)] + NSNumber TracesSampleRate { get; set; } - // -(instancetype _Nonnull)initWithFrames:(NSArray * _Nonnull)frames registers:(NSDictionary * _Nonnull)registers; - [Export("initWithFrames:registers:")] - NativeHandle Constructor(SentryFrame[] frames, NSDictionary registers); + // @property (copy, nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler; + [NullAllowed, Export("tracesSampler", ArgumentSemantic.Copy)] + SentryTracesSamplerCallback TracesSampler { get; set; } + + // @property (readonly, nonatomic) BOOL isTracingEnabled; + [Export("isTracingEnabled")] + bool IsTracingEnabled { get; } - // -(void)fixDuplicateFrames; - [Export("fixDuplicateFrames")] - void FixDuplicateFrames(); -} + // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppIncludes; + [Export("inAppIncludes", ArgumentSemantic.Copy)] + string[] InAppIncludes { get; } -// @interface SentryThread : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryThread : SentrySerializable -{ - // @property (copy, nonatomic) NSNumber * _Nonnull threadId; - [Export("threadId", ArgumentSemantic.Copy)] - NSNumber ThreadId { get; set; } + // -(void)addInAppInclude:(NSString * _Nonnull)inAppInclude; + [Export("addInAppInclude:")] + void AddInAppInclude(string inAppInclude); - // @property (copy, nonatomic) NSString * _Nullable name; - [NullAllowed, Export("name")] - string Name { get; set; } + [Wrap("WeakUrlSessionDelegate")] + [NullAllowed] + NSUrlSessionDelegate UrlSessionDelegate { get; set; } - // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; - [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] - SentryStacktrace Stacktrace { get; set; } + // @property (nonatomic, weak) id _Nullable urlSessionDelegate; + [NullAllowed, Export("urlSessionDelegate", ArgumentSemantic.Weak)] + NSObject WeakUrlSessionDelegate { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable crashed; - [NullAllowed, Export("crashed", ArgumentSemantic.Copy)] - NSNumber Crashed { get; set; } + // @property (nonatomic, strong) NSURLSession * _Nullable urlSession; + [NullAllowed, Export("urlSession", ArgumentSemantic.Strong)] + NSUrlSession UrlSession { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable current; - [NullAllowed, Export("current", ArgumentSemantic.Copy)] - NSNumber Current { get; set; } + // @property (nonatomic) BOOL enableSwizzling; + [Export("enableSwizzling")] + bool EnableSwizzling { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable isMain; - [NullAllowed, Export("isMain", ArgumentSemantic.Copy)] - NSNumber IsMain { get; set; } + // @property (copy, nonatomic) NSSet * _Nonnull swizzleClassNameExcludes; + [Export("swizzleClassNameExcludes", ArgumentSemantic.Copy)] + NSSet SwizzleClassNameExcludes { get; set; } - // -(instancetype _Nonnull)initWithThreadId:(NSNumber * _Nonnull)threadId; - [Export("initWithThreadId:")] - NativeHandle Constructor(NSNumber threadId); -} + // @property (nonatomic) BOOL enableCoreDataTracing; + [Export("enableCoreDataTracing")] + bool EnableCoreDataTracing { get; set; } -// @interface SentryTraceContext : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentryTraceContext : SentrySerializable -{ - // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export("traceId")] - SentryId TraceId { get; } + // @property (copy, nonatomic) void (^ _Nullable)(SentryProfileOptions * _Nonnull) configureProfiling; + [NullAllowed, Export("configureProfiling", ArgumentSemantic.Copy)] + Action ConfigureProfiling { get; set; } - // @property (readonly, nonatomic) NSString * _Nonnull publicKey; - [Export("publicKey")] - string PublicKey { get; } + // @property (nonatomic, strong) SentryProfileOptions * _Nullable profiling; + [NullAllowed, Export("profiling", ArgumentSemantic.Strong)] + SentryProfileOptions Profiling { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export("releaseName")] - string ReleaseName { get; } + // -(BOOL)isContinuousProfilingEnabled __attribute__((warn_unused_result(""))); + [Export("isContinuousProfilingEnabled")] + bool IsContinuousProfilingEnabled { get; } - // @property (readonly, nonatomic) NSString * _Nullable environment; - [NullAllowed, Export("environment")] - string Environment { get; } + // -(BOOL)isProfilingCorrelatedToTraces __attribute__((warn_unused_result(""))); + [Export("isProfilingCorrelatedToTraces")] + bool IsProfilingCorrelatedToTraces { get; } - // @property (readonly, nonatomic) NSString * _Nullable transaction; - [NullAllowed, Export("transaction")] - string Transaction { get; } + // @property (nonatomic) BOOL sendClientReports; + [Export("sendClientReports")] + bool SendClientReports { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable userSegment; - [NullAllowed, Export("userSegment")] - string UserSegment { get; } + // @property (nonatomic) BOOL enableAppHangTracking; + [Export("enableAppHangTracking")] + bool EnableAppHangTracking { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable sampleRate; - [NullAllowed, Export("sampleRate")] - string SampleRate { get; } + // @property (nonatomic) NSTimeInterval appHangTimeoutInterval; + [Export("appHangTimeoutInterval")] + double AppHangTimeoutInterval { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable sampleRand; - [NullAllowed, Export("sampleRand")] - string SampleRand { get; } + // @property (nonatomic) BOOL enableAutoBreadcrumbTracking; + [Export("enableAutoBreadcrumbTracking")] + bool EnableAutoBreadcrumbTracking { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable sampled; - [NullAllowed, Export("sampled")] - string Sampled { get; } + // @property (nonatomic) BOOL enablePropagateTraceparent; + [Export("enablePropagateTraceparent")] + bool EnablePropagateTraceparent { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable replayId; - [NullAllowed, Export("replayId")] - string ReplayId { get; } + // @property (copy, nonatomic) NSArray * _Nonnull tracePropagationTargets; + [Export("tracePropagationTargets", ArgumentSemantic.Copy)] + NSObject[] TracePropagationTargets { get; set; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId publicKey:(NSString * _Nonnull)publicKey releaseName:(NSString * _Nullable)releaseName environment:(NSString * _Nullable)environment transaction:(NSString * _Nullable)transaction userSegment:(NSString * _Nullable)userSegment sampleRate:(NSString * _Nullable)sampleRate sampled:(NSString * _Nullable)sampled replayId:(NSString * _Nullable)replayId; - [Export("initWithTraceId:publicKey:releaseName:environment:transaction:userSegment:sampleRate:sampled:replayId:")] - NativeHandle Constructor(SentryId traceId, string publicKey, [NullAllowed] string releaseName, [NullAllowed] string environment, [NullAllowed] string transaction, [NullAllowed] string userSegment, [NullAllowed] string sampleRate, [NullAllowed] string sampled, [NullAllowed] string replayId); + // @property (nonatomic) BOOL enableCaptureFailedRequests; + [Export("enableCaptureFailedRequests")] + bool EnableCaptureFailedRequests { get; set; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId publicKey:(NSString * _Nonnull)publicKey releaseName:(NSString * _Nullable)releaseName environment:(NSString * _Nullable)environment transaction:(NSString * _Nullable)transaction userSegment:(NSString * _Nullable)userSegment sampleRate:(NSString * _Nullable)sampleRate sampleRand:(NSString * _Nullable)sampleRand sampled:(NSString * _Nullable)sampled replayId:(NSString * _Nullable)replayId; - [Export("initWithTraceId:publicKey:releaseName:environment:transaction:userSegment:sampleRate:sampleRand:sampled:replayId:")] - NativeHandle Constructor(SentryId traceId, string publicKey, [NullAllowed] string releaseName, [NullAllowed] string environment, [NullAllowed] string transaction, [NullAllowed] string userSegment, [NullAllowed] string sampleRate, [NullAllowed] string sampleRand, [NullAllowed] string sampled, [NullAllowed] string replayId); + // @property (copy, nonatomic) NSArray * _Nonnull failedRequestStatusCodes; + [Export("failedRequestStatusCodes", ArgumentSemantic.Copy)] + SentryHttpStatusCodeRange[] FailedRequestStatusCodes { get; set; } - // -(instancetype _Nullable)initWithScope:(SentryScope * _Nonnull)scope options:(SentryOptions * _Nonnull)options; - [Export("initWithScope:options:")] - NativeHandle Constructor(SentryScope scope, SentryOptions options); + // @property (copy, nonatomic) NSArray * _Nonnull failedRequestTargets; + [Export("failedRequestTargets", ArgumentSemantic.Copy)] + NSObject[] FailedRequestTargets { get; set; } - // -(instancetype _Nullable)initWithDict:(NSDictionary * _Nonnull)dictionary; - [Export("initWithDict:")] - NativeHandle Constructor(NSDictionary dictionary); + // @property (nonatomic) BOOL enableMetricKit; + [Export("enableMetricKit")] + bool EnableMetricKit { get; set; } - // -(instancetype _Nullable)initWithTracer:(SentryTracer * _Nonnull)tracer scope:(SentryScope * _Nullable)scope options:(SentryOptions * _Nonnull)options; - [Export("initWithTracer:scope:options:")] - NativeHandle Constructor(SentryTracer tracer, [NullAllowed] SentryScope scope, SentryOptions options); + // @property (nonatomic) BOOL enableMetricKitRawPayload; + [Export("enableMetricKitRawPayload")] + bool EnableMetricKitRawPayload { get; set; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId options:(SentryOptions * _Nonnull)options userSegment:(NSString * _Nullable)userSegment replayId:(NSString * _Nullable)replayId; - [Export("initWithTraceId:options:userSegment:replayId:")] - NativeHandle Constructor(SentryId traceId, SentryOptions options, [NullAllowed] string userSegment, [NullAllowed] string replayId); + // @property (nonatomic) BOOL enableTimeToFullDisplayTracing; + [Export("enableTimeToFullDisplayTracing")] + bool EnableTimeToFullDisplayTracing { get; set; } - // -(SentryBaggage * _Nonnull)toBaggage; - [Export("toBaggage")] - SentryBaggage ToBaggage(); -} + // @property (nonatomic) BOOL swiftAsyncStacktraces; + [Export("swiftAsyncStacktraces")] + bool SwiftAsyncStacktraces { get; set; } -// @interface SentryTraceHeader : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryTraceHeader -{ - // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export("traceId")] - SentryId TraceId { get; } + // @property (copy, nonatomic) NSString * _Nonnull cacheDirectoryPath; + [Export("cacheDirectoryPath")] + string CacheDirectoryPath { get; set; } - // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; - [Export("spanId")] - SentrySpanId SpanId { get; } + // @property (nonatomic) BOOL enableSpotlight; + [Export("enableSpotlight")] + bool EnableSpotlight { get; set; } - // @property (readonly, nonatomic) SentrySampleDecision sampled; - [Export("sampled")] - SentrySampleDecision Sampled { get; } + // @property (copy, nonatomic) NSString * _Nonnull spotlightUrl; + [Export("spotlightUrl")] + string SpotlightUrl { get; set; } - // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId sampled:(SentrySampleDecision)sampled; - [Export("initWithTraceId:spanId:sampled:")] - NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, SentrySampleDecision sampled); + // @property (nonatomic, strong) SentryExperimentalOptions * _Nonnull experimental; + [Export("experimental", ArgumentSemantic.Strong)] + SentryExperimentalOptions Experimental { get; set; } - // -(NSString * _Nonnull)value; - [Export("value")] - string Value { get; } + // +(BOOL)isValidSampleRate:(NSNumber * _Nonnull)rate __attribute__((warn_unused_result(""))); + [Static] + [Export("isValidSampleRate:")] + bool IsValidSampleRate(NSNumber rate); + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull defaultEnvironment; + [Static] + [Export("defaultEnvironment")] + string DefaultEnvironment { get; } } -// @interface SentryTransactionContext : SentrySpanContext -[BaseType(typeof(SentrySpanContext))] +// @interface SentryClient : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry12SentryClient")] [DisableDefaultCtor] [Internal] -interface SentryTransactionContext +interface SentryClient { - // @property (readonly, nonatomic) NSString * _Nonnull name; - [Export("name")] - string Name { get; } + // -(instancetype _Nullable)initWithOptions:(SentryOptions * _Nonnull)options __attribute__((objc_designated_initializer)); + [Export("initWithOptions:")] + [DesignatedInitializer] + NativeHandle Constructor(SentryOptions options); - // @property (readonly, nonatomic) SentryTransactionNameSource nameSource; - [Export("nameSource")] - SentryTransactionNameSource NameSource { get; } + // @property (readonly, nonatomic) BOOL isEnabled; + [Export("isEnabled")] + bool IsEnabled { get; } - // @property (nonatomic, strong) NSNumber * _Nullable sampleRate; - [NullAllowed, Export("sampleRate", ArgumentSemantic.Strong)] - NSNumber SampleRate { get; set; } + // @property (nonatomic, strong) SentryOptions * _Nonnull options; + [Export("options", ArgumentSemantic.Strong)] + SentryOptions Options { get; set; } - // @property (nonatomic, strong) NSNumber * _Nullable sampleRand; - [NullAllowed, Export("sampleRand", ArgumentSemantic.Strong)] - NSNumber SampleRand { get; set; } + // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event; + [Export("captureEvent:")] + SentryId CaptureEvent(SentryEvent @event); - // @property (nonatomic) SentrySampleDecision parentSampled; - [Export("parentSampled", ArgumentSemantic.Assign)] - SentrySampleDecision ParentSampled { get; set; } + // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope; + [Export("captureEvent:withScope:")] + SentryId CaptureEvent(SentryEvent @event, SentryScope scope); - // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRate; - [NullAllowed, Export("parentSampleRate", ArgumentSemantic.Strong)] - NSNumber ParentSampleRate { get; set; } + // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error; + [Export("captureError:")] + SentryId CaptureError(NSError error); - // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRand; - [NullAllowed, Export("parentSampleRand", ArgumentSemantic.Strong)] - NSNumber ParentSampleRand { get; set; } + // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope; + [Export("captureError:withScope:")] + SentryId CaptureError(NSError error, SentryScope scope); - // @property (assign, nonatomic) BOOL forNextAppLaunch; - [Export("forNextAppLaunch")] - bool ForNextAppLaunch { get; set; } + // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception; + [Export("captureException:")] + SentryId CaptureException(NSException exception); - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; - [Export("initWithName:operation:")] - NativeHandle Constructor(string name, string operation); + // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope; + [Export("captureException:withScope:")] + SentryId CaptureException(NSException exception, SentryScope scope); - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled __attribute__((deprecated("Use initWithName:operation:sampled:sampleRate:sampleRand instead"))); - [Export("initWithName:operation:sampled:")] - NativeHandle Constructor(string name, string operation, SentrySampleDecision sampled); + // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message; + [Export("captureMessage:")] + SentryId CaptureMessage(string message); - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled sampleRate:(NSNumber * _Nullable)sampleRate sampleRand:(NSNumber * _Nullable)sampleRand; - [Export("initWithName:operation:sampled:sampleRate:sampleRand:")] - NativeHandle Constructor(string name, string operation, SentrySampleDecision sampled, [NullAllowed] NSNumber sampleRate, [NullAllowed] NSNumber sampleRand); + // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope; + [Export("captureMessage:withScope:")] + SentryId CaptureMessage(string message, SentryScope scope); - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation traceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentSpanId:(SentrySpanId * _Nullable)parentSpanId parentSampled:(SentrySampleDecision)parentSampled __attribute__((deprecated("Use initWithName:operation:traceId:spanId:parentSpanId:parentSampled:parentSampleRate:parentSampleRand instead"))); - [Export("initWithName:operation:traceId:spanId:parentSpanId:parentSampled:")] - NativeHandle Constructor(string name, string operation, SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentSpanId, SentrySampleDecision parentSampled); + // -(void)captureFeedback:(SentryFeedback * _Nonnull)feedback withScope:(SentryScope * _Nonnull)scope; + [Export("captureFeedback:withScope:")] + void CaptureFeedback(SentryFeedback feedback, SentryScope scope); - // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation traceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentSpanId:(SentrySpanId * _Nullable)parentSpanId parentSampled:(SentrySampleDecision)parentSampled parentSampleRate:(NSNumber * _Nullable)parentSampleRate parentSampleRand:(NSNumber * _Nullable)parentSampleRand; - [Export("initWithName:operation:traceId:spanId:parentSpanId:parentSampled:parentSampleRate:parentSampleRand:")] - NativeHandle Constructor(string name, string operation, SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentSpanId, SentrySampleDecision parentSampled, [NullAllowed] NSNumber parentSampleRate, [NullAllowed] NSNumber parentSampleRand); + // -(void)captureLog:(SentryLog * _Nonnull)log withScope:(SentryScope * _Nonnull)scope; + [Export("captureLog:withScope:")] + void CaptureLog(SentryLog log, SentryScope scope); + + // -(void)flush:(NSTimeInterval)timeout; + [Export("flush:")] + void Flush(double timeout); + + // -(void)close; + [Export("close")] + void Close(); } -// @interface SentryUser : NSObject -[BaseType(typeof(NSObject))] +// @interface SentryDebugImageProvider : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry24SentryDebugImageProvider")] [Internal] -interface SentryUser : SentrySerializable +interface SentryDebugImageProvider { - // @property (copy, atomic) NSString * _Nullable userId; - [NullAllowed, Export("userId")] - string UserId { get; set; } - - // @property (copy, atomic) NSString * _Nullable email; - [NullAllowed, Export("email")] - string Email { get; set; } + // -(NSArray * _Nonnull)getDebugImagesFromCacheForFrames:(NSArray * _Nonnull)frames __attribute__((warn_unused_result(""))); + [Export("getDebugImagesFromCacheForFrames:")] + SentryDebugMeta[] GetDebugImagesFromCacheForFrames(SentryFrame[] frames); - // @property (copy, atomic) NSString * _Nullable username; - [NullAllowed, Export("username")] - string Username { get; set; } + // -(NSArray * _Nonnull)getDebugImagesFromCacheForThreads:(NSArray * _Nonnull)threads __attribute__((warn_unused_result(""))); + [Export("getDebugImagesFromCacheForThreads:")] + SentryDebugMeta[] GetDebugImagesFromCacheForThreads(SentryThread[] threads); - // @property (copy, atomic) NSString * _Nullable ipAddress; - [NullAllowed, Export("ipAddress")] - string IpAddress { get; set; } + // -(NSArray * _Nonnull)getDebugImagesForImageAddressesFromCache:(NSSet * _Nonnull)imageAddresses __attribute__((warn_unused_result(""))); + [Export("getDebugImagesForImageAddressesFromCache:")] + SentryDebugMeta[] GetDebugImagesForImageAddressesFromCache(NSSet imageAddresses); - // @property (copy, atomic) DEPRECATED_MSG_ATTRIBUTE("This field is deprecated and will be removed in the next major update.") NSString * segment __attribute__((deprecated("This field is deprecated and will be removed in the next major update."))); - [Export("segment")] - string Segment { get; set; } + // -(NSArray * _Nonnull)getDebugImagesFromCache __attribute__((warn_unused_result(""))); + [Export("getDebugImagesFromCache")] + SentryDebugMeta[] DebugImagesFromCache { get; } +} - // @property (copy, atomic) NSString * _Nullable name; - [NullAllowed, Export("name")] - string Name { get; set; } +// @interface SentryDependencyContainer : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry25SentryDependencyContainer")] +[Internal] +interface SentryDependencyContainer +{ + // +(SentryDependencyContainer * _Nonnull)sharedInstance __attribute__((warn_unused_result(""))); + [Static] + [Export("sharedInstance")] + SentryDependencyContainer SharedInstance { get; } - // @property (nonatomic, strong) SentryGeo * _Nullable geo; - [NullAllowed, Export("geo", ArgumentSemantic.Strong)] - SentryGeo Geo { get; set; } + // @property (nonatomic, strong) SentryDebugImageProvider * _Nonnull debugImageProvider; + [Export("debugImageProvider", ArgumentSemantic.Strong)] + SentryDebugImageProvider DebugImageProvider { get; set; } +} - // @property (atomic, strong) NSDictionary * _Nullable data; - [NullAllowed, Export("data", ArgumentSemantic.Strong)] - NSDictionary Data { get; set; } +// @interface SentryDsn : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryDsn +{ + // @property (readonly, copy, nonatomic) NSURL * _Nonnull url; + [Export("url", ArgumentSemantic.Copy)] + NSUrl Url { get; } - // -(instancetype _Nonnull)initWithUserId:(NSString * _Nonnull)userId; - [Export("initWithUserId:")] - NativeHandle Constructor(string userId); + // -(instancetype _Nullable)initWithString:(NSString * _Nullable)dsnString didFailWithError:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer)); + [Export("initWithString:didFailWithError:")] + [DesignatedInitializer] + NativeHandle Constructor([NullAllowed] string dsnString, [NullAllowed] out NSError error); - // -(BOOL)isEqualToUser:(SentryUser * _Nonnull)user; - [Export("isEqualToUser:")] - bool IsEqualToUser(SentryUser user); + // -(NSString * _Nonnull)getHash __attribute__((warn_unused_result(""))); + [Export("getHash")] + string Hash { get; } - // -(NSUInteger)hash; - [Export("hash")] - nuint Hash { get; } + // -(NSURL * _Nonnull)getEnvelopeEndpoint __attribute__((warn_unused_result(""))); + [Export("getEnvelopeEndpoint")] + NSUrl EnvelopeEndpoint { get; } } // @interface SentryExperimentalOptions : NSObject @@ -2131,14 +1959,6 @@ interface SentryUser : SentrySerializable [Internal] interface SentryExperimentalOptions { - // @property (nonatomic) BOOL enableDataSwizzling; - [Export("enableDataSwizzling")] - bool EnableDataSwizzling { get; set; } - - // @property (nonatomic) BOOL enableFileManagerSwizzling; - [Export("enableFileManagerSwizzling")] - bool EnableFileManagerSwizzling { get; set; } - // @property (nonatomic) BOOL enableUnhandledCPPExceptionsV2; [Export("enableUnhandledCPPExceptionsV2")] bool EnableUnhandledCPPExceptionsV2 { get; set; } @@ -2147,10 +1967,6 @@ interface SentryExperimentalOptions [Export("enableSessionReplayInUnreliableEnvironment")] bool EnableSessionReplayInUnreliableEnvironment { get; set; } - // @property (nonatomic) BOOL enableLogs; - [Export("enableLogs")] - bool EnableLogs { get; set; } - // -(void)validateOptions:(NSDictionary * _Nullable)options; [Export("validateOptions:")] void ValidateOptions([NullAllowed] NSDictionary options); @@ -2166,39 +1982,153 @@ interface SentryFeedback [Export("eventId", ArgumentSemantic.Strong)] SentryId EventId { get; } - // -(instancetype _Nonnull)initWithMessage:(NSString * _Nonnull)message name:(NSString * _Nullable)name email:(NSString * _Nullable)email source:(enum SentryFeedbackSource)source associatedEventId:(SentryId * _Nullable)associatedEventId attachments:(NSArray * _Nullable)attachments __attribute__((objc_designated_initializer)); + // -(instancetype _Nonnull)initWithMessage:(NSString * _Nonnull)message name:(NSString * _Nullable)name email:(NSString * _Nullable)email source:(enum SentryFeedbackSource)source associatedEventId:(SentryId * _Nullable)associatedEventId attachments:(NSArray * _Nullable)attachments __attribute__((objc_designated_initializer)); [Export("initWithMessage:name:email:source:associatedEventId:attachments:")] [DesignatedInitializer] - NativeHandle Constructor(string message, [NullAllowed] string name, [NullAllowed] string email, SentryFeedbackSource source, [NullAllowed] SentryId associatedEventId, [NullAllowed] NSData[] attachments); + NativeHandle Constructor(string message, [NullAllowed] string name, [NullAllowed] string email, SentryFeedbackSource source, [NullAllowed] SentryId associatedEventId, [NullAllowed] SentryAttachment[] attachments); } -// @interface SentryId : NSObject -[BaseType(typeof(NSObject), Name = "_TtC6Sentry8SentryId")] +// @interface SentryFeedbackAPI : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry17SentryFeedbackAPI")] [Internal] -interface SentryId +interface SentryFeedbackAPI { - // @property (readonly, nonatomic, strong, class) SentryId * _Nonnull empty; - [Static] - [Export("empty", ArgumentSemantic.Strong)] - SentryId Empty { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString; - [Export("sentryIdString")] - string SentryIdString { get; } + [Export("showWidget")] + void ShowWidget(); + [Export("hideWidget")] + void HideWidget(); +} - // -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer)); - [Export("initWithUuid:")] +// @interface SentryHub : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry9SentryHub")] +[DisableDefaultCtor] +[Internal] +interface SentryHub +{ + // -(instancetype _Nonnull)initWithClient:(SentryClient * _Nullable)client andScope:(SentryScope * _Nullable)scope __attribute__((objc_designated_initializer)); + [Export("initWithClient:andScope:")] [DesignatedInitializer] - NativeHandle Constructor(NSUuid uuid); + NativeHandle Constructor([NullAllowed] SentryClient client, [NullAllowed] SentryScope scope); - // -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer)); - [Export("initWithUUIDString:")] - [DesignatedInitializer] - NativeHandle Constructor(string uuidString); + // -(void)startSession; + [Export("startSession")] + void StartSession(); - // @property (readonly, nonatomic) NSUInteger hash; - [Export("hash")] - nuint Hash { get; } + // -(void)endSession; + [Export("endSession")] + void EndSession(); + + // -(void)endSessionWithTimestamp:(NSDate * _Nonnull)timestamp; + [Export("endSessionWithTimestamp:")] + void EndSessionWithTimestamp(NSDate timestamp); + + // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event; + [Export("captureEvent:")] + SentryId CaptureEvent(SentryEvent @event); + + // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope; + [Export("captureEvent:withScope:")] + SentryId CaptureEvent(SentryEvent @event, SentryScope scope); + + // -(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; + [Export("startTransactionWithName:operation:")] + SentrySpan StartTransactionWithName(string name, string operation); + + // -(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope; + [Export("startTransactionWithName:operation:bindToScope:")] + SentrySpan StartTransactionWithName(string name, string operation, bool bindToScope); + + // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext; + [Export("startTransactionWithContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext); + + // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope; + [Export("startTransactionWithContext:bindToScope:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope); + + // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; + [Export("startTransactionWithContext:bindToScope:customSamplingContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope, NSDictionary customSamplingContext); + + // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; + [Export("startTransactionWithContext:customSamplingContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); + + // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error; + [Export("captureError:")] + SentryId CaptureError(NSError error); + + // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope; + [Export("captureError:withScope:")] + SentryId CaptureError(NSError error, SentryScope scope); + + // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception; + [Export("captureException:")] + SentryId CaptureException(NSException exception); + + // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope; + [Export("captureException:withScope:")] + SentryId CaptureException(NSException exception, SentryScope scope); + + // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message; + [Export("captureMessage:")] + SentryId CaptureMessage(string message); + + // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope; + [Export("captureMessage:withScope:")] + SentryId CaptureMessage(string message, SentryScope scope); + + // -(void)captureFeedback:(SentryFeedback * _Nonnull)feedback; + [Export("captureFeedback:")] + void CaptureFeedback(SentryFeedback feedback); + + // -(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback; + [Export("configureScope:")] + void ConfigureScope(Action callback); + + // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb; + [Export("addBreadcrumb:")] + void AddBreadcrumb(SentryBreadcrumb crumb); + + // -(SentryClient * _Nullable)getClient __attribute__((warn_unused_result(""))); + [NullAllowed, Export("getClient")] + SentryClient Client { get; } + + // @property (readonly, nonatomic, strong) SentryScope * _Nonnull scope; + [Export("scope", ArgumentSemantic.Strong)] + SentryScope Scope { get; } + + // @property (readonly, nonatomic, strong) SentryLogger * _Nonnull logger; + [Export("logger", ArgumentSemantic.Strong)] + SentryLogger Logger { get; } + + // -(void)bindClient:(SentryClient * _Nullable)client; + [Export("bindClient:")] + void BindClient([NullAllowed] SentryClient client); + + // -(BOOL)hasIntegration:(NSString * _Nonnull)integrationName __attribute__((warn_unused_result(""))); + [Export("hasIntegration:")] + bool HasIntegration(string integrationName); + + // -(BOOL)isIntegrationInstalled:(Class _Nonnull)integrationClass __attribute__((warn_unused_result(""))); + [Export("isIntegrationInstalled:")] + bool IsIntegrationInstalled(Class integrationClass); + + // -(void)setUser:(SentryUser * _Nullable)user; + [Export("setUser:")] + void SetUser([NullAllowed] SentryUser user); + + // -(void)reportFullyDisplayed; + [Export("reportFullyDisplayed")] + void ReportFullyDisplayed(); + + // -(void)flush:(NSTimeInterval)timeout; + [Export("flush:")] + void Flush(double timeout); + + // -(void)close; + [Export("close")] + void Close(); } // @interface SentryLog : NSObject @@ -2215,17 +2145,73 @@ interface SentryLog [Export("traceId", ArgumentSemantic.Strong)] SentryId TraceId { get; set; } - // @property (nonatomic) enum SentryStructuredLogLevel level; + // @property (nonatomic) enum SentryLogLevel level; [Export("level", ArgumentSemantic.Assign)] - SentryStructuredLogLevel Level { get; set; } + SentryLogLevel Level { get; set; } // @property (copy, nonatomic) NSString * _Nonnull body; [Export("body")] string Body { get; set; } + // @property (copy, nonatomic) NSDictionary * _Nonnull attributes; + [Export("attributes", ArgumentSemantic.Copy)] + NSDictionary Attributes { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable severityNumber; [NullAllowed, Export("severityNumber", ArgumentSemantic.Strong)] NSNumber SeverityNumber { get; set; } + + // -(instancetype _Nonnull)initWithLevel:(enum SentryLogLevel)level body:(NSString * _Nonnull)body; + [Export("initWithLevel:body:")] + NativeHandle Constructor(SentryLogLevel level, string body); + + // -(instancetype _Nonnull)initWithLevel:(enum SentryLogLevel)level body:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("initWithLevel:body:attributes:")] + NativeHandle Constructor(SentryLogLevel level, string body, NSDictionary attributes); + + // -(void)setAttribute:(SentryLogAttribute * _Nullable)attribute forKey:(NSString * _Nonnull)key; + [Export("setAttribute:forKey:")] + void SetAttribute([NullAllowed] SentryLogAttribute attribute, string key); +} + +// @interface SentryLogAttribute : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryLogAttribute +{ + // @property (readonly, copy, nonatomic) NSString * _Nonnull type; + [Export("type")] + string Type { get; } + + // @property (readonly, nonatomic) id _Nonnull value; + [Export("value")] + NSObject Value { get; } + + // -(instancetype _Nonnull)initWithString:(NSString * _Nonnull)value __attribute__((objc_designated_initializer)); + [Export("initWithString:")] + [DesignatedInitializer] + NativeHandle Constructor(string value); + + // -(instancetype _Nonnull)initWithBoolean:(BOOL)value __attribute__((objc_designated_initializer)); + [Export("initWithBoolean:")] + [DesignatedInitializer] + NativeHandle Constructor(bool value); + + // -(instancetype _Nonnull)initWithInteger:(NSInteger)value __attribute__((objc_designated_initializer)); + [Export("initWithInteger:")] + [DesignatedInitializer] + NativeHandle Constructor(nint value); + + // -(instancetype _Nonnull)initWithDouble:(double)value __attribute__((objc_designated_initializer)); + [Export("initWithDouble:")] + [DesignatedInitializer] + NativeHandle Constructor(double value); + + // -(instancetype _Nonnull)initWithFloat:(float)value __attribute__((objc_designated_initializer)); + [Export("initWithFloat:")] + [DesignatedInitializer] + NativeHandle Constructor(float value); } // @interface SentryLogger : NSObject @@ -2234,6 +2220,7 @@ interface SentryLog [Internal] interface SentryLogger { + // -(void)trace:(NSString * _Nonnull)body; [Export("trace:")] void Trace(string body); @@ -2397,10 +2384,6 @@ interface SentryReplayOptions : SentryRedactOptions [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] Class[] UnmaskedViewClasses { get; set; } - // @property (nonatomic) BOOL enableExperimentalViewRenderer __attribute__((deprecated("", "enableViewRendererV2"))); - [Export("enableExperimentalViewRenderer")] - bool EnableExperimentalViewRenderer { get; set; } - // @property (nonatomic) BOOL enableViewRendererV2; [Export("enableViewRendererV2")] bool EnableViewRendererV2 { get; set; } @@ -2571,6 +2554,8 @@ interface SentrySDK [Static] [Export("captureFeedback:")] void CaptureFeedback(SentryFeedback feedback); + + // @property (readonly, nonatomic, strong, class) SentryFeedbackAPI * _Nonnull feedback; [Static] [Export("feedback", ArgumentSemantic.Strong)] SentryFeedbackAPI Feedback { get; } @@ -2650,10 +2635,60 @@ interface SentrySDK [Export("stopProfiler")] void StopProfiler(); - // +(void)clearLogger; + // @property (readonly, nonatomic, strong, class) SentryOptions * _Nullable startOption; + [Static] + [NullAllowed, Export("startOption", ArgumentSemantic.Strong)] + SentryOptions StartOption { get; } + + // +(void)setStartWith:(SentryOptions * _Nullable)option; [Static] - [Export("clearLogger")] - void ClearLogger(); + [Export("setStartWith:")] + void SetStartWith([NullAllowed] SentryOptions option); +} + +// @interface SentryScreenFrames : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry18SentryScreenFrames")] +[DisableDefaultCtor] +[Internal] +interface SentryScreenFrames +{ + // @property (readonly, nonatomic) NSUInteger total; + [Export("total")] + nuint Total { get; } + + // @property (readonly, nonatomic) NSUInteger frozen; + [Export("frozen")] + nuint Frozen { get; } + + // @property (readonly, nonatomic) NSUInteger slow; + [Export("slow")] + nuint Slow { get; } + + // @property (readonly, copy, nonatomic) NSArray *> * _Nonnull slowFrameTimestamps; + [Export("slowFrameTimestamps", ArgumentSemantic.Copy)] + NSDictionary[] SlowFrameTimestamps { get; } + + // @property (readonly, copy, nonatomic) NSArray *> * _Nonnull frozenFrameTimestamps; + [Export("frozenFrameTimestamps", ArgumentSemantic.Copy)] + NSDictionary[] FrozenFrameTimestamps { get; } + + // @property (readonly, copy, nonatomic) NSArray *> * _Nonnull frameRateTimestamps; + [Export("frameRateTimestamps", ArgumentSemantic.Copy)] + NSDictionary[] FrameRateTimestamps { get; } + + // -(instancetype _Nonnull)initWithTotal:(NSUInteger)total frozen:(NSUInteger)frozen slow:(NSUInteger)slow __attribute__((objc_designated_initializer)); + [Export("initWithTotal:frozen:slow:")] + [DesignatedInitializer] + NativeHandle Constructor(nuint total, nuint frozen, nuint slow); + + // -(instancetype _Nonnull)initWithTotal:(NSUInteger)total frozen:(NSUInteger)frozen slow:(NSUInteger)slow slowFrameTimestamps:(NSArray *> * _Nonnull)slowFrameTimestamps frozenFrameTimestamps:(NSArray *> * _Nonnull)frozenFrameTimestamps frameRateTimestamps:(NSArray *> * _Nonnull)frameRateTimestamps __attribute__((objc_designated_initializer)); + [Export("initWithTotal:frozen:slow:slowFrameTimestamps:frozenFrameTimestamps:frameRateTimestamps:")] + [DesignatedInitializer] + NativeHandle Constructor(nuint total, nuint frozen, nuint slow, NSDictionary[] slowFrameTimestamps, NSDictionary[] frozenFrameTimestamps, NSDictionary[] frameRateTimestamps); + + // @property (readonly, nonatomic) NSUInteger hash; + [Export("hash")] + nuint Hash { get; } } // @protocol SentryViewScreenshotProvider @@ -2703,61 +2738,12 @@ interface SentryViewScreenshotOptions : SentryRedactOptions NativeHandle Constructor(bool enableViewRendererV2, bool enableFastViewRendering, bool maskAllText, bool maskAllImages, Class[] maskedViewClasses, Class[] unmaskedViewClasses); } -// @interface SentryScreenFrames : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryScreenFrames -{ - // -(instancetype _Nonnull)initWithTotal:(NSUInteger)total frozen:(NSUInteger)frozen slow:(NSUInteger)slow; - [Export("initWithTotal:frozen:slow:")] - NativeHandle Constructor(nuint total, nuint frozen, nuint slow); - - // -(instancetype _Nonnull)initWithTotal:(NSUInteger)total frozen:(NSUInteger)frozen slow:(NSUInteger)slow slowFrameTimestamps:(SentryFrameInfoTimeSeries * _Nonnull)slowFrameTimestamps frozenFrameTimestamps:(SentryFrameInfoTimeSeries * _Nonnull)frozenFrameTimestamps frameRateTimestamps:(SentryFrameInfoTimeSeries * _Nonnull)frameRateTimestamps; - [Export("initWithTotal:frozen:slow:slowFrameTimestamps:frozenFrameTimestamps:frameRateTimestamps:")] - NativeHandle Constructor(nuint total, nuint frozen, nuint slow, NSDictionary[] slowFrameTimestamps, NSDictionary[] frozenFrameTimestamps, NSDictionary[] frameRateTimestamps); - - // @property (readonly, assign, nonatomic) NSUInteger total; - [Export("total")] - nuint Total { get; } - - // @property (readonly, assign, nonatomic) NSUInteger frozen; - [Export("frozen")] - nuint Frozen { get; } - - // @property (readonly, assign, nonatomic) NSUInteger slow; - [Export("slow")] - nuint Slow { get; } - - // @property (readonly, copy, nonatomic) SentryFrameInfoTimeSeries * _Nonnull slowFrameTimestamps; - [Export("slowFrameTimestamps", ArgumentSemantic.Copy)] - NSDictionary[] SlowFrameTimestamps { get; } - - // @property (readonly, copy, nonatomic) SentryFrameInfoTimeSeries * _Nonnull frozenFrameTimestamps; - [Export("frozenFrameTimestamps", ArgumentSemantic.Copy)] - NSDictionary[] FrozenFrameTimestamps { get; } - - // @property (readonly, copy, nonatomic) SentryFrameInfoTimeSeries * _Nonnull frameRateTimestamps; - [Export("frameRateTimestamps", ArgumentSemantic.Copy)] - NSDictionary[] FrameRateTimestamps { get; } -} - // @interface PrivateSentrySDKOnly : NSObject [BaseType(typeof(NSObject))] [Internal] interface PrivateSentrySDKOnly { - // +(NSArray * _Nonnull)getDebugImages; - [Static] - [Export("getDebugImages")] - SentryDebugMeta[] DebugImages { get; } - - // +(NSArray * _Nonnull)getDebugImagesCrashed:(BOOL)isCrash; - [Static] - [Export("getDebugImagesCrashed:")] - SentryDebugMeta[] GetDebugImagesCrashed(bool isCrash); - // +(void)setSdkName:(NSString * _Nonnull)sdkName andVersionString:(NSString * _Nonnull)versionString; [Static] [Export("setSdkName:andVersionString:")] @@ -2834,12 +2820,13 @@ interface PrivateSentrySDKOnly [Export("currentScreenFrames", ArgumentSemantic.Assign)] SentryScreenFrames CurrentScreenFrames { get; } - // +(NSArray * _Nonnull)captureScreenshots; + // +(NSArray * _Nullable)captureScreenshots; [Static] [Export("captureScreenshots")] + [return: NullAllowed] NSData[] CaptureScreenshots(); - // +(NSData * _Nonnull)captureViewHierarchy; + // +(NSData * _Nullable)captureViewHierarchy; [Static] [Export("captureViewHierarchy")] NSData CaptureViewHierarchy(); diff --git a/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs b/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs index 1077aa21f2..f6642888cb 100644 --- a/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs +++ b/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs @@ -12,12 +12,21 @@ namespace Sentry.CocoaSdk; [Native] -internal enum SentryLogLevel : long +internal enum SentryAttachmentType : long { - None = 1, - Error, - Debug, - Verbose + EventAttachment, + ViewHierarchy +} + +[Native] +internal enum SentryLevel : ulong +{ + None = 0, + Debug = 1, + Info = 2, + Warning = 3, + Error = 4, + Fatal = 5 } [Native] @@ -78,25 +87,23 @@ internal enum SentryANRType : long } [Native] -internal enum SentryFeedbackSource : long +internal enum SentryExtensionType : long { Widget = 0, - Custom = 1 + Intent = 1, + Action = 2, + Share = 3 } [Native] -internal enum SentryLevel : ulong +internal enum SentryFeedbackSource : long { - None = 0, - Debug = 1, - Info = 2, - Warning = 3, - Error = 4, - Fatal = 5 + Widget = 0, + Custom = 1 } [Native] -internal enum SentryStructuredLogLevel : long +internal enum SentryLogLevel : long { Trace = 0, Debug = 1, diff --git a/src/Sentry/Platforms/Cocoa/BindableSentryOptions.cs b/src/Sentry/Platforms/Cocoa/BindableSentryOptions.cs index edc529dc86..39b4779294 100644 --- a/src/Sentry/Platforms/Cocoa/BindableSentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/BindableSentryOptions.cs @@ -35,7 +35,9 @@ public void ApplyTo(SentryOptions.NativeOptions options) options.AppHangTimeoutInterval = AppHangTimeoutInterval ?? options.AppHangTimeoutInterval; options.IdleTimeout = IdleTimeout ?? options.IdleTimeout; options.EnableAppHangTracking = EnableAppHangTracking ?? options.EnableAppHangTracking; +#pragma warning disable CS0618 // Type or member is obsolete options.EnableAppHangTrackingV2 = EnableAppHangTrackingV2 ?? options.EnableAppHangTrackingV2; +#pragma warning restore CS0618 // Type or member is obsolete options.EnableAutoBreadcrumbTracking = EnableAutoBreadcrumbTracking ?? options.EnableAutoBreadcrumbTracking; options.EnableAutoPerformanceTracing = EnableAutoPerformanceTracing ?? options.EnableAutoPerformanceTracing; options.EnableCoreDataTracing = EnableCoreDataTracing ?? options.EnableCoreDataTracing; diff --git a/src/Sentry/Platforms/Cocoa/CFunctions.cs b/src/Sentry/Platforms/Cocoa/CFunctions.cs index 71bc1946ae..b543d34b9d 100644 --- a/src/Sentry/Platforms/Cocoa/CFunctions.cs +++ b/src/Sentry/Platforms/Cocoa/CFunctions.cs @@ -12,7 +12,7 @@ internal static Dictionary LoadDebugImages(IDiagnosticLogger? var result = new Dictionary(); try { - var cList = SentryCocoaHybridSdk.DebugImages; + var cList = SentryCocoaDependencyContainer.SharedInstance.DebugImageProvider.DebugImagesFromCache; logger?.LogDebug("There are {0} native debug images, parsing the information.", cList.Length); foreach (var cItem in cList) { diff --git a/src/Sentry/Platforms/Cocoa/Sentry.Cocoa.props b/src/Sentry/Platforms/Cocoa/Sentry.Cocoa.props index aeef195bfa..3c98f1fc4e 100644 --- a/src/Sentry/Platforms/Cocoa/Sentry.Cocoa.props +++ b/src/Sentry/Platforms/Cocoa/Sentry.Cocoa.props @@ -9,6 +9,7 @@ + diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index 807be62b5d..c318989d48 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -83,6 +83,7 @@ internal NativeOptions(SentryOptions options) /// /// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2 /// + [Obsolete("Use EnableAppHangTracking")] public bool EnableAppHangTrackingV2 { get; set; } = false; /// @@ -237,7 +238,6 @@ internal NativeOptions(SentryOptions options) /// public bool EnableTracing { get; set; } = false; - internal List? InAppExcludes { get; private set; } internal List? InAppIncludes { get; private set; } /// @@ -248,10 +248,9 @@ internal NativeOptions(SentryOptions options) /// /// https://docs.sentry.io/platforms/apple/configuration/options/#in-app-exclude /// + [Obsolete("This option had no effect and was removed.")] public void AddInAppExclude(string prefix) { - InAppExcludes ??= new List(); - InAppExcludes.Add(prefix); } /// diff --git a/src/Sentry/Platforms/Cocoa/SentrySdk.cs b/src/Sentry/Platforms/Cocoa/SentrySdk.cs index a2ce0c5230..df8e461049 100644 --- a/src/Sentry/Platforms/Cocoa/SentrySdk.cs +++ b/src/Sentry/Platforms/Cocoa/SentrySdk.cs @@ -116,7 +116,6 @@ private static void InitSentryCocoaSdk(SentryOptions options) nativeOptions.IdleTimeout = options.Native.IdleTimeout.TotalSeconds; nativeOptions.Dist = options.Distribution; nativeOptions.EnableAppHangTracking = options.Native.EnableAppHangTracking; - nativeOptions.EnableAppHangTrackingV2 = options.Native.EnableAppHangTrackingV2; nativeOptions.EnableAutoBreadcrumbTracking = options.Native.EnableAutoBreadcrumbTracking; nativeOptions.EnableAutoPerformanceTracing = options.Native.EnableAutoPerformanceTracing; nativeOptions.EnableCoreDataTracing = options.Native.EnableCoreDataTracing; @@ -134,8 +133,7 @@ private static void InitSentryCocoaSdk(SentryOptions options) // StitchAsyncCode removed from Cocoa SDK in 8.6.0 with https://github.com/getsentry/sentry-cocoa/pull/2973 // nativeOptions.StitchAsyncCode = options.Native.StitchAsyncCode; - // In-App Excludes and Includes to be passed to the Cocoa SDK - options.Native.InAppExcludes?.ForEach(x => nativeOptions.AddInAppExclude(x)); + // In-App Includes to be passed to the Cocoa SDK options.Native.InAppIncludes?.ForEach(x => nativeOptions.AddInAppInclude(x)); // These options are intentionally not expose or modified From cf215b11c0cc7af40da48769ec24828f1712ceba Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 22 Jan 2026 08:41:33 +0100 Subject: [PATCH 03/13] Adapt to 9.2.0 changes --- scripts/generate-cocoa-bindings.ps1 | 6 +- scripts/patch-cocoa-bindings.cs | 2 +- src/Sentry.Bindings.Cocoa/ApiDefinitions.cs | 478 +++++++++++-------- src/Sentry.Bindings.Cocoa/StructsAndEnums.cs | 8 + 4 files changed, 291 insertions(+), 203 deletions(-) diff --git a/scripts/generate-cocoa-bindings.ps1 b/scripts/generate-cocoa-bindings.ps1 index 0e25e93be7..1c102f3b17 100644 --- a/scripts/generate-cocoa-bindings.ps1 +++ b/scripts/generate-cocoa-bindings.ps1 @@ -132,12 +132,12 @@ foreach ($file in $filesToPatch) Write-Host "File not found: $file" } } -$privateHeaderFile = "$PrivateHeadersPath/PrivatesHeader.h" +$privateHeaderFile = "$HeadersPath/PrivatesHeader.h" if (Test-Path $privateHeaderFile) { $content = Get-Content -Path $privateHeaderFile -Raw $content = $content -replace '"SentryDefines.h"', '"../Headers/SentryDefines.h"' - $content = $content -replace '"SentryProfilingConditionals.h"', '"../PrivateHeaders/SentryProfilingConditionals.h"' + $content = $content -replace '"SentryProfilingConditionals.h"', '"../Headers/SentryProfilingConditionals.h"' Set-Content -Path $privateHeaderFile -Value $content Write-Host "Patched includes: $privateHeaderFile" } @@ -169,7 +169,7 @@ sharpie bind -sdk $iPhoneSdkVersion ` -scope "$CocoaSdkPath" ` "$HeadersPath/Sentry.h" ` "$HeadersPath/Sentry-Swift.h" ` - "$PrivateHeadersPath/PrivateSentrySDKOnly.h" ` + "$HeadersPath/PrivateSentrySDKOnly.h" ` -o $BindingsPath ` -c -Wno-objc-property-no-attribute ` -F"$iPhoneSdkPath/System/Library/SubFrameworks" # needed for UIUtilities.framework in Xcode 26+ diff --git a/scripts/patch-cocoa-bindings.cs b/scripts/patch-cocoa-bindings.cs index c9fbd0371d..4dc4966d20 100644 --- a/scripts/patch-cocoa-bindings.cs +++ b/scripts/patch-cocoa-bindings.cs @@ -112,6 +112,7 @@ "ISentryRRWebEvent", "PrivateSentrySDKOnly", "SentryAttachment", + "SentryAttribute", "SentryBaggage", "SentryBreadcrumb", "SentryClient", @@ -130,7 +131,6 @@ "SentryHub", "SentryId", "SentryLog", - "SentryLogAttribute", "SentryLogger", "SentryMeasurementUnit", "SentryMeasurementUnitDuration", diff --git a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs index 44965e323a..4a79cff830 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -8,7 +8,6 @@ using CoreFoundation; using CoreGraphics; using Foundation; -using MetricKit; using ObjCRuntime; using Sentry; using UIKit; @@ -1489,6 +1488,166 @@ interface SentryUser : SentrySerializable nuint Hash { get; } } +// @interface PrivateSentrySDKOnly : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface PrivateSentrySDKOnly +{ + + // +(void)setSdkName:(NSString * _Nonnull)sdkName andVersionString:(NSString * _Nonnull)versionString; + [Static] + [Export("setSdkName:andVersionString:")] + void SetSdkName(string sdkName, string versionString); + + // +(void)setSdkName:(NSString * _Nonnull)sdkName; + [Static] + [Export("setSdkName:")] + void SetSdkName(string sdkName); + + // +(NSString * _Nonnull)getSdkName; + [Static] + [Export("getSdkName")] + string SdkName { get; } + + // +(NSString * _Nonnull)getSdkVersionString; + [Static] + [Export("getSdkVersionString")] + string SdkVersionString { get; } + + // +(void)addSdkPackage:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; + [Static] + [Export("addSdkPackage:version:")] + void AddSdkPackage(string name, string version); + + // +(NSDictionary * _Nonnull)getExtraContext; + [Static] + [Export("getExtraContext")] + NSDictionary ExtraContext { get; } + + // +(void)setTrace:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId; + [Static] + [Export("setTrace:spanId:")] + void SetTrace(SentryId traceId, SentrySpanId spanId); + + // +(uint64_t)startProfilerForTrace:(SentryId * _Nonnull)traceId; + [Static] + [Export("startProfilerForTrace:")] + ulong StartProfilerForTrace(SentryId traceId); + + // +(NSMutableDictionary * _Nullable)collectProfileBetween:(uint64_t)startSystemTime and:(uint64_t)endSystemTime forTrace:(SentryId * _Nonnull)traceId; + [Static] + [Export("collectProfileBetween:and:forTrace:")] + [return: NullAllowed] + NSMutableDictionary CollectProfileBetween(ulong startSystemTime, ulong endSystemTime, SentryId traceId); + + // +(void)discardProfilerForTrace:(SentryId * _Nonnull)traceId; + [Static] + [Export("discardProfilerForTrace:")] + void DiscardProfilerForTrace(SentryId traceId); + + // @property (readonly, copy, nonatomic, class) NSString * _Nonnull installationID; + [Static] + [Export("installationID")] + string InstallationID { get; } + + // @property (readonly, copy, nonatomic, class) SentryOptions * _Nonnull options; + [Static] + [Export("options", ArgumentSemantic.Copy)] + SentryOptions Options { get; } + + // @property (assign, nonatomic, class) BOOL framesTrackingMeasurementHybridSDKMode; + [Static] + [Export("framesTrackingMeasurementHybridSDKMode")] + bool FramesTrackingMeasurementHybridSDKMode { get; set; } + + // @property (readonly, assign, nonatomic, class) BOOL isFramesTrackingRunning; + [Static] + [Export("isFramesTrackingRunning")] + bool IsFramesTrackingRunning { get; } + + // @property (readonly, assign, nonatomic, class) SentryScreenFrames * _Nonnull currentScreenFrames; + [Static] + [Export("currentScreenFrames", ArgumentSemantic.Assign)] + SentryScreenFrames CurrentScreenFrames { get; } + + // +(NSArray * _Nullable)captureScreenshots; + [Static] + [Export("captureScreenshots")] + [return: NullAllowed] + NSData[] CaptureScreenshots(); + + // +(NSData * _Nullable)captureViewHierarchy; + [Static] + [Export("captureViewHierarchy")] + NSData CaptureViewHierarchy(); + + // +(void)setCurrentScreen:(NSString * _Nullable)screenName; + [Static] + [Export("setCurrentScreen:")] + void SetCurrentScreen([NullAllowed] string screenName); + + // +(UIView * _Nonnull)sessionReplayMaskingOverlay:(id _Nonnull)options; + [Static] + [Export("sessionReplayMaskingOverlay:")] + UIView SessionReplayMaskingOverlay(SentryRedactOptions options); + + // +(void)configureSessionReplayWith:(id _Nullable)breadcrumbConverter screenshotProvider:(id _Nullable)screenshotProvider; + [Static] + [Export("configureSessionReplayWith:screenshotProvider:")] + void ConfigureSessionReplayWith([NullAllowed] SentryReplayBreadcrumbConverter breadcrumbConverter, [NullAllowed] SentryViewScreenshotProvider screenshotProvider); + + // +(void)captureReplay; + [Static] + [Export("captureReplay")] + void CaptureReplay(); + + // +(NSString * _Nullable)getReplayId; + [Static] + [NullAllowed, Export("getReplayId")] + string ReplayId { get; } + + // +(void)addReplayIgnoreClasses:(NSArray * _Nonnull)classes; + [Static] + [Export("addReplayIgnoreClasses:")] + void AddReplayIgnoreClasses(Class[] classes); + + // +(void)addReplayRedactClasses:(NSArray * _Nonnull)classes; + [Static] + [Export("addReplayRedactClasses:")] + void AddReplayRedactClasses(Class[] classes); + + // +(void)setIgnoreContainerClass:(Class _Nonnull)containerClass; + [Static] + [Export("setIgnoreContainerClass:")] + void SetIgnoreContainerClass(Class containerClass); + + // +(void)setRedactContainerClass:(Class _Nonnull)containerClass; + [Static] + [Export("setRedactContainerClass:")] + void SetRedactContainerClass(Class containerClass); + + // +(void)setReplayTags:(NSDictionary * _Nonnull)tags; + [Static] + [Export("setReplayTags:")] + void SetReplayTags(NSDictionary tags); + + // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary; + [Static] + [Export("userWithDictionary:")] + SentryUser UserWithDictionary(NSDictionary dictionary); + + // +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary; + [Static] + [Export("breadcrumbWithDictionary:")] + SentryBreadcrumb BreadcrumbWithDictionary(NSDictionary dictionary); + + // +(SentryOptions * _Nullable)optionsWithDictionary:(NSDictionary * _Nonnull)options didFailWithError:(NSError * _Nullable * _Nullable)error; + [Static] + [Export("optionsWithDictionary:didFailWithError:")] + [return: NullAllowed] + SentryOptions OptionsWithDictionary(NSDictionary options, [NullAllowed] out NSError error); +} + // @interface SentryOptions : NSObject [BaseType(typeof(NSObject))] [Internal] @@ -1825,6 +1984,71 @@ interface SentryOptions string DefaultEnvironment { get; } } +// @interface SentryAttribute : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry15SentryAttribute")] +[DisableDefaultCtor] +[Internal] +interface SentryAttribute +{ + // @property (readonly, copy, nonatomic) NSString * _Nonnull type; + [Export("type")] + string Type { get; } + + // @property (readonly, nonatomic) id _Nonnull value; + [Export("value")] + NSObject Value { get; } + + // -(instancetype _Nonnull)initWithString:(NSString * _Nonnull)value __attribute__((objc_designated_initializer)); + [Export("initWithString:")] + [DesignatedInitializer] + NativeHandle Constructor(string value); + + // -(instancetype _Nonnull)initWithBoolean:(BOOL)value __attribute__((objc_designated_initializer)); + [Export("initWithBoolean:")] + [DesignatedInitializer] + NativeHandle Constructor(bool value); + + // -(instancetype _Nonnull)initWithInteger:(NSInteger)value __attribute__((objc_designated_initializer)); + [Export("initWithInteger:")] + [DesignatedInitializer] + NativeHandle Constructor(nint value); + + // -(instancetype _Nonnull)initWithDouble:(double)value __attribute__((objc_designated_initializer)); + [Export("initWithDouble:")] + [DesignatedInitializer] + NativeHandle Constructor(double value); + + // -(instancetype _Nonnull)initWithFloat:(float)value __attribute__((objc_designated_initializer)); + [Export("initWithFloat:")] + [DesignatedInitializer] + NativeHandle Constructor(float value); + + // -(instancetype _Nonnull)initWithStringArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); + [Export("initWithStringArray:")] + [DesignatedInitializer] + NativeHandle Constructor(string[] values); + + // -(instancetype _Nonnull)initWithBooleanArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); + [Export("initWithBooleanArray:")] + [DesignatedInitializer] + NativeHandle Constructor(NSNumber[] values); + + // -(instancetype _Nonnull)initWithIntegerArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); + [Export("initWithIntegerArray:")] + [DesignatedInitializer] + NativeHandle Constructor(NSNumber[] values); + + // -(instancetype _Nonnull)initWithDoubleArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); + [Export("initWithDoubleArray:")] + [DesignatedInitializer] + NativeHandle Constructor(NSNumber[] values); + + // -(instancetype _Nonnull)initWithFloatArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); + [Export("initWithFloatArray:")] + [DesignatedInitializer] + NativeHandle Constructor(NSNumber[] values); +} + // @interface SentryClient : NSObject [BaseType(typeof(NSObject), Name = "_TtC6Sentry12SentryClient")] [DisableDefaultCtor] @@ -1967,6 +2191,10 @@ interface SentryExperimentalOptions [Export("enableSessionReplayInUnreliableEnvironment")] bool EnableSessionReplayInUnreliableEnvironment { get; set; } + // @property (nonatomic) BOOL enableMetrics; + [Export("enableMetrics")] + bool EnableMetrics { get; set; } + // -(void)validateOptions:(NSDictionary * _Nullable)options; [Export("validateOptions:")] void ValidateOptions([NullAllowed] NSDictionary options); @@ -2153,7 +2381,7 @@ interface SentryLog [Export("body")] string Body { get; set; } - // @property (copy, nonatomic) NSDictionary * _Nonnull attributes; + // @property (copy, nonatomic) NSDictionary * _Nonnull attributes; [Export("attributes", ArgumentSemantic.Copy)] NSDictionary Attributes { get; set; } @@ -2165,53 +2393,13 @@ interface SentryLog [Export("initWithLevel:body:")] NativeHandle Constructor(SentryLogLevel level, string body); - // -(instancetype _Nonnull)initWithLevel:(enum SentryLogLevel)level body:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + // -(instancetype _Nonnull)initWithLevel:(enum SentryLogLevel)level body:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; [Export("initWithLevel:body:attributes:")] NativeHandle Constructor(SentryLogLevel level, string body, NSDictionary attributes); - // -(void)setAttribute:(SentryLogAttribute * _Nullable)attribute forKey:(NSString * _Nonnull)key; + // -(void)setAttribute:(SentryAttribute * _Nullable)attribute forKey:(NSString * _Nonnull)key; [Export("setAttribute:forKey:")] - void SetAttribute([NullAllowed] SentryLogAttribute attribute, string key); -} - -// @interface SentryLogAttribute : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryLogAttribute -{ - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) id _Nonnull value; - [Export("value")] - NSObject Value { get; } - - // -(instancetype _Nonnull)initWithString:(NSString * _Nonnull)value __attribute__((objc_designated_initializer)); - [Export("initWithString:")] - [DesignatedInitializer] - NativeHandle Constructor(string value); - - // -(instancetype _Nonnull)initWithBoolean:(BOOL)value __attribute__((objc_designated_initializer)); - [Export("initWithBoolean:")] - [DesignatedInitializer] - NativeHandle Constructor(bool value); - - // -(instancetype _Nonnull)initWithInteger:(NSInteger)value __attribute__((objc_designated_initializer)); - [Export("initWithInteger:")] - [DesignatedInitializer] - NativeHandle Constructor(nint value); - - // -(instancetype _Nonnull)initWithDouble:(double)value __attribute__((objc_designated_initializer)); - [Export("initWithDouble:")] - [DesignatedInitializer] - NativeHandle Constructor(double value); - - // -(instancetype _Nonnull)initWithFloat:(float)value __attribute__((objc_designated_initializer)); - [Export("initWithFloat:")] - [DesignatedInitializer] - NativeHandle Constructor(float value); + void SetAttribute([NullAllowed] SentryAttribute attribute, string key); } // @interface SentryLogger : NSObject @@ -2336,6 +2524,16 @@ interface SentryRedactOptions [Abstract] [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] Class[] UnmaskedViewClasses { get; } + + // @required @property (readonly, copy, nonatomic) NSSet * _Nonnull excludedViewClasses; + [Abstract] + [Export("excludedViewClasses", ArgumentSemantic.Copy)] + NSSet ExcludedViewClasses { get; } + + // @required @property (readonly, copy, nonatomic) NSSet * _Nonnull includedViewClasses; + [Abstract] + [Export("includedViewClasses", ArgumentSemantic.Copy)] + NSSet IncludedViewClasses { get; } } // @protocol SentryReplayBreadcrumbConverter @@ -2384,6 +2582,26 @@ interface SentryReplayOptions : SentryRedactOptions [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] Class[] UnmaskedViewClasses { get; set; } + // @property (copy, nonatomic) NSSet * _Nonnull excludedViewClasses; + [Export("excludedViewClasses", ArgumentSemantic.Copy)] + NSSet ExcludedViewClasses { get; set; } + + // @property (copy, nonatomic) NSSet * _Nonnull includedViewClasses; + [Export("includedViewClasses", ArgumentSemantic.Copy)] + NSSet IncludedViewClasses { get; set; } + + // -(void)excludeViewTypeFromSubtreeTraversal:(NSString * _Nonnull)viewType; + [Export("excludeViewTypeFromSubtreeTraversal:")] + void ExcludeViewTypeFromSubtreeTraversal(string viewType); + + // -(void)includeViewTypeInSubtreeTraversal:(NSString * _Nonnull)viewType; + [Export("includeViewTypeInSubtreeTraversal:")] + void IncludeViewTypeInSubtreeTraversal(string viewType); + + // @property (nonatomic) BOOL enableExperimentalViewRenderer __attribute__((deprecated("", "enableViewRendererV2"))); + [Export("enableExperimentalViewRenderer")] + bool EnableExperimentalViewRenderer { get; set; } + // @property (nonatomic) BOOL enableViewRendererV2; [Export("enableViewRendererV2")] bool EnableViewRendererV2 { get; set; } @@ -2732,162 +2950,24 @@ interface SentryViewScreenshotOptions : SentryRedactOptions [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] Class[] UnmaskedViewClasses { get; set; } - // -(instancetype _Nonnull)initWithEnableViewRendererV2:(BOOL)enableViewRendererV2 enableFastViewRendering:(BOOL)enableFastViewRendering maskAllText:(BOOL)maskAllText maskAllImages:(BOOL)maskAllImages maskedViewClasses:(NSArray * _Nonnull)maskedViewClasses unmaskedViewClasses:(NSArray * _Nonnull)unmaskedViewClasses __attribute__((objc_designated_initializer)); - [Export("initWithEnableViewRendererV2:enableFastViewRendering:maskAllText:maskAllImages:maskedViewClasses:unmaskedViewClasses:")] - [DesignatedInitializer] - NativeHandle Constructor(bool enableViewRendererV2, bool enableFastViewRendering, bool maskAllText, bool maskAllImages, Class[] maskedViewClasses, Class[] unmaskedViewClasses); -} - -// @interface PrivateSentrySDKOnly : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface PrivateSentrySDKOnly -{ - - // +(void)setSdkName:(NSString * _Nonnull)sdkName andVersionString:(NSString * _Nonnull)versionString; - [Static] - [Export("setSdkName:andVersionString:")] - void SetSdkName(string sdkName, string versionString); - - // +(void)setSdkName:(NSString * _Nonnull)sdkName; - [Static] - [Export("setSdkName:")] - void SetSdkName(string sdkName); - - // +(NSString * _Nonnull)getSdkName; - [Static] - [Export("getSdkName")] - string SdkName { get; } - - // +(NSString * _Nonnull)getSdkVersionString; - [Static] - [Export("getSdkVersionString")] - string SdkVersionString { get; } - - // +(void)addSdkPackage:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; - [Static] - [Export("addSdkPackage:version:")] - void AddSdkPackage(string name, string version); - - // +(NSDictionary * _Nonnull)getExtraContext; - [Static] - [Export("getExtraContext")] - NSDictionary ExtraContext { get; } - - // +(void)setTrace:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId; - [Static] - [Export("setTrace:spanId:")] - void SetTrace(SentryId traceId, SentrySpanId spanId); - - // +(uint64_t)startProfilerForTrace:(SentryId * _Nonnull)traceId; - [Static] - [Export("startProfilerForTrace:")] - ulong StartProfilerForTrace(SentryId traceId); - - // +(NSMutableDictionary * _Nullable)collectProfileBetween:(uint64_t)startSystemTime and:(uint64_t)endSystemTime forTrace:(SentryId * _Nonnull)traceId; - [Static] - [Export("collectProfileBetween:and:forTrace:")] - [return: NullAllowed] - NSMutableDictionary CollectProfileBetween(ulong startSystemTime, ulong endSystemTime, SentryId traceId); - - // +(void)discardProfilerForTrace:(SentryId * _Nonnull)traceId; - [Static] - [Export("discardProfilerForTrace:")] - void DiscardProfilerForTrace(SentryId traceId); - - // @property (readonly, copy, nonatomic, class) NSString * _Nonnull installationID; - [Static] - [Export("installationID")] - string InstallationID { get; } - - // @property (readonly, copy, nonatomic, class) SentryOptions * _Nonnull options; - [Static] - [Export("options", ArgumentSemantic.Copy)] - SentryOptions Options { get; } + // @property (readonly, copy, nonatomic) NSSet * _Nonnull excludedViewClasses; + [Export("excludedViewClasses", ArgumentSemantic.Copy)] + NSSet ExcludedViewClasses { get; } - // @property (assign, nonatomic, class) BOOL framesTrackingMeasurementHybridSDKMode; - [Static] - [Export("framesTrackingMeasurementHybridSDKMode")] - bool FramesTrackingMeasurementHybridSDKMode { get; set; } + // @property (readonly, copy, nonatomic) NSSet * _Nonnull includedViewClasses; + [Export("includedViewClasses", ArgumentSemantic.Copy)] + NSSet IncludedViewClasses { get; } - // @property (readonly, assign, nonatomic, class) BOOL isFramesTrackingRunning; - [Static] - [Export("isFramesTrackingRunning")] - bool IsFramesTrackingRunning { get; } + // -(void)excludeViewTypeFromSubtreeTraversal:(NSString * _Nonnull)viewType; + [Export("excludeViewTypeFromSubtreeTraversal:")] + void ExcludeViewTypeFromSubtreeTraversal(string viewType); - // @property (readonly, assign, nonatomic, class) SentryScreenFrames * _Nonnull currentScreenFrames; - [Static] - [Export("currentScreenFrames", ArgumentSemantic.Assign)] - SentryScreenFrames CurrentScreenFrames { get; } - - // +(NSArray * _Nullable)captureScreenshots; - [Static] - [Export("captureScreenshots")] - [return: NullAllowed] - NSData[] CaptureScreenshots(); - - // +(NSData * _Nullable)captureViewHierarchy; - [Static] - [Export("captureViewHierarchy")] - NSData CaptureViewHierarchy(); - - // +(void)setCurrentScreen:(NSString * _Nullable)screenName; - [Static] - [Export("setCurrentScreen:")] - void SetCurrentScreen([NullAllowed] string screenName); - - // +(UIView * _Nonnull)sessionReplayMaskingOverlay:(id _Nonnull)options; - [Static] - [Export("sessionReplayMaskingOverlay:")] - UIView SessionReplayMaskingOverlay(SentryRedactOptions options); + // -(void)includeViewTypeInSubtreeTraversal:(NSString * _Nonnull)viewType; + [Export("includeViewTypeInSubtreeTraversal:")] + void IncludeViewTypeInSubtreeTraversal(string viewType); - // +(void)configureSessionReplayWith:(id _Nullable)breadcrumbConverter screenshotProvider:(id _Nullable)screenshotProvider; - [Static] - [Export("configureSessionReplayWith:screenshotProvider:")] - void ConfigureSessionReplayWith([NullAllowed] SentryReplayBreadcrumbConverter breadcrumbConverter, [NullAllowed] SentryViewScreenshotProvider screenshotProvider); - - // +(void)captureReplay; - [Static] - [Export("captureReplay")] - void CaptureReplay(); - - // +(NSString * _Nullable)getReplayId; - [Static] - [NullAllowed, Export("getReplayId")] - string ReplayId { get; } - - // +(void)addReplayIgnoreClasses:(NSArray * _Nonnull)classes; - [Static] - [Export("addReplayIgnoreClasses:")] - void AddReplayIgnoreClasses(Class[] classes); - - // +(void)addReplayRedactClasses:(NSArray * _Nonnull)classes; - [Static] - [Export("addReplayRedactClasses:")] - void AddReplayRedactClasses(Class[] classes); - - // +(void)setIgnoreContainerClass:(Class _Nonnull)containerClass; - [Static] - [Export("setIgnoreContainerClass:")] - void SetIgnoreContainerClass(Class containerClass); - - // +(void)setRedactContainerClass:(Class _Nonnull)containerClass; - [Static] - [Export("setRedactContainerClass:")] - void SetRedactContainerClass(Class containerClass); - - // +(void)setReplayTags:(NSDictionary * _Nonnull)tags; - [Static] - [Export("setReplayTags:")] - void SetReplayTags(NSDictionary tags); - - // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary; - [Static] - [Export("userWithDictionary:")] - SentryUser UserWithDictionary(NSDictionary dictionary); - - // +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary; - [Static] - [Export("breadcrumbWithDictionary:")] - SentryBreadcrumb BreadcrumbWithDictionary(NSDictionary dictionary); + // -(instancetype _Nonnull)initWithEnableViewRendererV2:(BOOL)enableViewRendererV2 enableFastViewRendering:(BOOL)enableFastViewRendering maskAllText:(BOOL)maskAllText maskAllImages:(BOOL)maskAllImages maskedViewClasses:(NSArray * _Nonnull)maskedViewClasses unmaskedViewClasses:(NSArray * _Nonnull)unmaskedViewClasses excludedViewClasses:(NSSet * _Nonnull)excludedViewClasses includedViewClasses:(NSSet * _Nonnull)includedViewClasses __attribute__((objc_designated_initializer)); + [Export("initWithEnableViewRendererV2:enableFastViewRendering:maskAllText:maskAllImages:maskedViewClasses:unmaskedViewClasses:excludedViewClasses:includedViewClasses:")] + [DesignatedInitializer] + NativeHandle Constructor(bool enableViewRendererV2, bool enableFastViewRendering, bool maskAllText, bool maskAllImages, Class[] maskedViewClasses, Class[] unmaskedViewClasses, NSSet excludedViewClasses, NSSet includedViewClasses); } diff --git a/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs b/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs index f6642888cb..25d0a44a2e 100644 --- a/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs +++ b/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs @@ -76,6 +76,14 @@ internal enum SentrySpanStatus : ulong DataLoss } +[Native] +internal enum SentryAppStartType : ulong +{ + Warm, + Cold, + Unknown +} + [Native] internal enum SentryANRType : long { From 6ff05147747f1e912a296370975e38a98378ce71 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 22 Jan 2026 09:36:25 +0100 Subject: [PATCH 04/13] Remove problematic SentryAttribute (not sure if needed?) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It has multiple conflicting NSNumber[] constructors for boolean, integer, and float arrays: error CS0111: Type 'SentryAttribute' already defines a member called 'Constructor' with the same parameter types --- scripts/patch-cocoa-bindings.cs | 3 +- src/Sentry.Bindings.Cocoa/ApiDefinitions.cs | 69 --------------------- 2 files changed, 2 insertions(+), 70 deletions(-) diff --git a/scripts/patch-cocoa-bindings.cs b/scripts/patch-cocoa-bindings.cs index 4dc4966d20..b30c85fbb0 100644 --- a/scripts/patch-cocoa-bindings.cs +++ b/scripts/patch-cocoa-bindings.cs @@ -88,6 +88,8 @@ .RemoveMethod("Sentry*", "IsEqual") // error CS0246: The type or namespace name '_NSZone' could not be found .RemoveMethod("Sentry*", "CopyWithZone") + // error CS0111: Type 'SentryAttribute' already defines a member called 'Constructor' with the same parameter types + .RemoveMethod("SentryLog", "SetAttribute") // SentryEnvelope* is not whitelisted .RemoveMethod("PrivateSentrySDKOnly", "CaptureEnvelope") .RemoveMethod("PrivateSentrySDKOnly", "EnvelopeWithData") @@ -112,7 +114,6 @@ "ISentryRRWebEvent", "PrivateSentrySDKOnly", "SentryAttachment", - "SentryAttribute", "SentryBaggage", "SentryBreadcrumb", "SentryClient", diff --git a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs index 4a79cff830..cec3e176fe 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -1984,71 +1984,6 @@ interface SentryOptions string DefaultEnvironment { get; } } -// @interface SentryAttribute : NSObject -[BaseType(typeof(NSObject), Name = "_TtC6Sentry15SentryAttribute")] -[DisableDefaultCtor] -[Internal] -interface SentryAttribute -{ - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; } - - // @property (readonly, nonatomic) id _Nonnull value; - [Export("value")] - NSObject Value { get; } - - // -(instancetype _Nonnull)initWithString:(NSString * _Nonnull)value __attribute__((objc_designated_initializer)); - [Export("initWithString:")] - [DesignatedInitializer] - NativeHandle Constructor(string value); - - // -(instancetype _Nonnull)initWithBoolean:(BOOL)value __attribute__((objc_designated_initializer)); - [Export("initWithBoolean:")] - [DesignatedInitializer] - NativeHandle Constructor(bool value); - - // -(instancetype _Nonnull)initWithInteger:(NSInteger)value __attribute__((objc_designated_initializer)); - [Export("initWithInteger:")] - [DesignatedInitializer] - NativeHandle Constructor(nint value); - - // -(instancetype _Nonnull)initWithDouble:(double)value __attribute__((objc_designated_initializer)); - [Export("initWithDouble:")] - [DesignatedInitializer] - NativeHandle Constructor(double value); - - // -(instancetype _Nonnull)initWithFloat:(float)value __attribute__((objc_designated_initializer)); - [Export("initWithFloat:")] - [DesignatedInitializer] - NativeHandle Constructor(float value); - - // -(instancetype _Nonnull)initWithStringArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); - [Export("initWithStringArray:")] - [DesignatedInitializer] - NativeHandle Constructor(string[] values); - - // -(instancetype _Nonnull)initWithBooleanArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); - [Export("initWithBooleanArray:")] - [DesignatedInitializer] - NativeHandle Constructor(NSNumber[] values); - - // -(instancetype _Nonnull)initWithIntegerArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); - [Export("initWithIntegerArray:")] - [DesignatedInitializer] - NativeHandle Constructor(NSNumber[] values); - - // -(instancetype _Nonnull)initWithDoubleArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); - [Export("initWithDoubleArray:")] - [DesignatedInitializer] - NativeHandle Constructor(NSNumber[] values); - - // -(instancetype _Nonnull)initWithFloatArray:(NSArray * _Nonnull)values __attribute__((objc_designated_initializer)); - [Export("initWithFloatArray:")] - [DesignatedInitializer] - NativeHandle Constructor(NSNumber[] values); -} - // @interface SentryClient : NSObject [BaseType(typeof(NSObject), Name = "_TtC6Sentry12SentryClient")] [DisableDefaultCtor] @@ -2396,10 +2331,6 @@ interface SentryLog // -(instancetype _Nonnull)initWithLevel:(enum SentryLogLevel)level body:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; [Export("initWithLevel:body:attributes:")] NativeHandle Constructor(SentryLogLevel level, string body, NSDictionary attributes); - - // -(void)setAttribute:(SentryAttribute * _Nullable)attribute forKey:(NSString * _Nonnull)key; - [Export("setAttribute:forKey:")] - void SetAttribute([NullAllowed] SentryAttribute attribute, string key); } // @interface SentryLogger : NSObject From f34b07717175fbccd9b2c328367b7d05b014a291 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 22 Jan 2026 14:03:31 +0100 Subject: [PATCH 05/13] Fix typo --- scripts/patch-cocoa-bindings.cs | 2 +- src/Sentry.Bindings.Cocoa/ApiDefinitions.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/patch-cocoa-bindings.cs b/scripts/patch-cocoa-bindings.cs index b30c85fbb0..515eef44ce 100644 --- a/scripts/patch-cocoa-bindings.cs +++ b/scripts/patch-cocoa-bindings.cs @@ -75,7 +75,7 @@ // Fix nullable return attributes .RemoveAttribute("PrivateSentrySDKOnly", "Capture*", "NullAllowed") .WithAttribute("PrivateSentrySDKOnly", "CaptureScreenshots", "return: NullAllowed") - .WithAttribute("PrivateSentrySDKOnly", "CaptureViewHierarchies", "return: NullAllowed") + .WithAttribute("PrivateSentrySDKOnly", "CaptureViewHierarchy", "return: NullAllowed") // For PrivateApiDefinitions.cs .WithModifier("SentryScope", "partial") // error CS0246: The type or namespace name 'iOS' could not be found diff --git a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs index cec3e176fe..c37a2b1359 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -1579,6 +1579,7 @@ interface PrivateSentrySDKOnly // +(NSData * _Nullable)captureViewHierarchy; [Static] [Export("captureViewHierarchy")] + [return: NullAllowed] NSData CaptureViewHierarchy(); // +(void)setCurrentScreen:(NSString * _Nullable)screenName; From 70594e82122603a75757c1861948f39798ed05ba Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 09:18:49 +0100 Subject: [PATCH 06/13] Explicit NullAllowed removal --- scripts/patch-cocoa-bindings.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/patch-cocoa-bindings.cs b/scripts/patch-cocoa-bindings.cs index 515eef44ce..0cef3d9420 100644 --- a/scripts/patch-cocoa-bindings.cs +++ b/scripts/patch-cocoa-bindings.cs @@ -73,7 +73,8 @@ .WithAttribute("SentryBeforeSendEventCallback", "return: NullAllowed") .WithAttribute("SentryTracesSamplerCallback", "return: NullAllowed") // Fix nullable return attributes - .RemoveAttribute("PrivateSentrySDKOnly", "Capture*", "NullAllowed") + .RemoveAttribute("PrivateSentrySDKOnly", "CaptureScreenshots", "NullAllowed") + .RemoveAttribute("PrivateSentrySDKOnly", "CaptureViewHierarchy", "NullAllowed") .WithAttribute("PrivateSentrySDKOnly", "CaptureScreenshots", "return: NullAllowed") .WithAttribute("PrivateSentrySDKOnly", "CaptureViewHierarchy", "return: NullAllowed") // For PrivateApiDefinitions.cs From 3884b507e3488821fab957d3495e98f4f33036f6 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 09:21:28 +0100 Subject: [PATCH 07/13] Change phrasing --- src/Sentry/Platforms/Cocoa/SentryOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index c318989d48..09a3bd6539 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -69,7 +69,7 @@ internal NativeOptions(SentryOptions options) public bool EnableAppHangTracking { get; set; } = false; /// - /// IMPORTANT: This feature is experimental and may have bugs. + /// IMPORTANT: App Hangs V2 is now the default. ///
/// As of version 8.39.0-beta.1 of the sentry-cocoa SDK, you can enable AppHangsV2, which is available on iOS and tvOS. /// The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking From b57e205d047e3eb24d615164d80b4c3d954755cb Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 09:22:38 +0100 Subject: [PATCH 08/13] Add clarification --- src/Sentry/Platforms/Cocoa/SentryOptions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index 09a3bd6539..977e023c05 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -72,6 +72,7 @@ internal NativeOptions(SentryOptions options) /// IMPORTANT: App Hangs V2 is now the default. ///
/// As of version 8.39.0-beta.1 of the sentry-cocoa SDK, you can enable AppHangsV2, which is available on iOS and tvOS. + /// Starting with version 9.0.0, App Hangs V2 is enabled by default. /// The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking /// app hangs, which you might choose to ignore. A fully-blocking app hang is when the main thread is stuck /// completely, and the app can't render a single frame. From 66618f978ffd14a43dac03a8da3530d1fc41afec Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 09:27:52 +0100 Subject: [PATCH 09/13] Forward to EnableAppHangTracking --- src/Sentry/Platforms/Cocoa/SentryOptions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index 977e023c05..2c301d48a9 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -84,8 +84,8 @@ internal NativeOptions(SentryOptions options) /// /// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2 /// - [Obsolete("Use EnableAppHangTracking")] - public bool EnableAppHangTrackingV2 { get; set; } = false; + [Obsolete("App Hangs V2 is now the default. Use EnableAppHangTracking instead.")] + public bool EnableAppHangTrackingV2 { get => EnableAppHangTracking; set => EnableAppHangTracking = value; } /// /// When enabled, the SDK adds breadcrumbs for various system events. From e827eaff26335b90a78a95a12e0af3de24b0251e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 10:08:02 +0100 Subject: [PATCH 10/13] Fix EnableAppHangTrackingV2 config order issue Prevent EnableAppHangTrackingV2=false from overriding EnableAppHangTracking=true by only applying true values from the obsolete V2 property. This maintains backward compatibility while fixing the silent disable issue. --- src/Sentry/Platforms/Cocoa/SentryOptions.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index 2c301d48a9..bcb57671f8 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -85,7 +85,17 @@ internal NativeOptions(SentryOptions options) /// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2 /// [Obsolete("App Hangs V2 is now the default. Use EnableAppHangTracking instead.")] - public bool EnableAppHangTrackingV2 { get => EnableAppHangTracking; set => EnableAppHangTracking = value; } + public bool EnableAppHangTrackingV2 + { + get => EnableAppHangTracking; + set + { + if (value) + { + EnableAppHangTracking = true; + } + } + } /// /// When enabled, the SDK adds breadcrumbs for various system events. From 4d94d48abd41a4e1f4ba22582a4987fe3b86e09e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 10:22:17 +0100 Subject: [PATCH 11/13] Revert "Fix EnableAppHangTrackingV2 config order issue" This reverts commit e827eaff26335b90a78a95a12e0af3de24b0251e. --- src/Sentry/Platforms/Cocoa/SentryOptions.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index bcb57671f8..2c301d48a9 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -85,17 +85,7 @@ internal NativeOptions(SentryOptions options) /// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2 /// [Obsolete("App Hangs V2 is now the default. Use EnableAppHangTracking instead.")] - public bool EnableAppHangTrackingV2 - { - get => EnableAppHangTracking; - set - { - if (value) - { - EnableAppHangTracking = true; - } - } - } + public bool EnableAppHangTrackingV2 { get => EnableAppHangTracking; set => EnableAppHangTracking = value; } /// /// When enabled, the SDK adds breadcrumbs for various system events. From 40432bd0d5bc56236c77071a214e187baa44ad11 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 10:22:21 +0100 Subject: [PATCH 12/13] Partially revert "Forward to EnableAppHangTracking" This partially reverts commit 66618f978ffd14a43dac03a8da3530d1fc41afec. --- src/Sentry/Platforms/Cocoa/SentryOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sentry/Platforms/Cocoa/SentryOptions.cs b/src/Sentry/Platforms/Cocoa/SentryOptions.cs index 2c301d48a9..bb5c6cf258 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -85,7 +85,7 @@ internal NativeOptions(SentryOptions options) /// See https://docs.sentry.io/platforms/apple/configuration/app-hangs/#app-hangs-v2 /// [Obsolete("App Hangs V2 is now the default. Use EnableAppHangTracking instead.")] - public bool EnableAppHangTrackingV2 { get => EnableAppHangTracking; set => EnableAppHangTracking = value; } + public bool EnableAppHangTrackingV2 { get; set; } = false; /// /// When enabled, the SDK adds breadcrumbs for various system events. From a9f36105b0455dd15116e77ca753285d389ce92a Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 26 Jan 2026 16:46:30 +0100 Subject: [PATCH 13/13] Enable app hang tracking if either option is set Combine EnableAppHangTracking and EnableAppHangTrackingV2 with OR logic when initializing the native SDK. This fixes the config order issue where setting both options could unexpectedly disable tracking, and ensures backward compatibility for users of the obsolete V2 option. Co-Authored-By: Claude Opus 4.5 --- src/Sentry/Platforms/Cocoa/SentrySdk.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sentry/Platforms/Cocoa/SentrySdk.cs b/src/Sentry/Platforms/Cocoa/SentrySdk.cs index df8e461049..90adf733c9 100644 --- a/src/Sentry/Platforms/Cocoa/SentrySdk.cs +++ b/src/Sentry/Platforms/Cocoa/SentrySdk.cs @@ -115,7 +115,9 @@ private static void InitSentryCocoaSdk(SentryOptions options) nativeOptions.AppHangTimeoutInterval = options.Native.AppHangTimeoutInterval.TotalSeconds; nativeOptions.IdleTimeout = options.Native.IdleTimeout.TotalSeconds; nativeOptions.Dist = options.Distribution; - nativeOptions.EnableAppHangTracking = options.Native.EnableAppHangTracking; +#pragma warning disable CS0618 // Type or member is obsolete + nativeOptions.EnableAppHangTracking = options.Native.EnableAppHangTracking || options.Native.EnableAppHangTrackingV2; +#pragma warning restore CS0618 // Type or member is obsolete nativeOptions.EnableAutoBreadcrumbTracking = options.Native.EnableAutoBreadcrumbTracking; nativeOptions.EnableAutoPerformanceTracing = options.Native.EnableAutoPerformanceTracing; nativeOptions.EnableCoreDataTracing = options.Native.EnableCoreDataTracing;