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 diff --git a/scripts/generate-cocoa-bindings.ps1 b/scripts/generate-cocoa-bindings.ps1 index 38b5eae0a2..1c102f3b17 100644 --- a/scripts/generate-cocoa-bindings.ps1 +++ b/scripts/generate-cocoa-bindings.ps1 @@ -132,7 +132,7 @@ 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 @@ -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 bcb3336487..0cef3d9420 100644 --- a/scripts/patch-cocoa-bindings.cs +++ b/scripts/patch-cocoa-bindings.cs @@ -72,6 +72,11 @@ .WithAttribute("SentryBeforeBreadcrumbCallback", "return: NullAllowed") .WithAttribute("SentryBeforeSendEventCallback", "return: NullAllowed") .WithAttribute("SentryTracesSamplerCallback", "return: NullAllowed") + // Fix nullable return attributes + .RemoveAttribute("PrivateSentrySDKOnly", "CaptureScreenshots", "NullAllowed") + .RemoveAttribute("PrivateSentrySDKOnly", "CaptureViewHierarchy", "NullAllowed") + .WithAttribute("PrivateSentrySDKOnly", "CaptureScreenshots", "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 @@ -84,24 +89,28 @@ .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") .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 +120,7 @@ "SentryClient", "SentryDebugImageProvider", "SentryDebugMeta", + "SentryDependencyContainer", "SentryDsn", "SentryEvent", "SentryException", @@ -129,6 +139,7 @@ "SentryMeasurementUnitFraction", "SentryMeasurementUnitInformation", "SentryMechanism", + "SentryMechanismContext", "SentryMechanismMeta", "SentryMessage", "SentryNSError", @@ -159,7 +170,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 +232,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 +301,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 +455,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..c37a2b1359 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -6,8 +6,8 @@ using System; using CoreFoundation; +using CoreGraphics; using Foundation; -using MetricKit; using ObjCRuntime; using Sentry; using UIKit; @@ -36,10 +36,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 +57,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 +83,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 +106,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 +141,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 +157,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 +234,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 +247,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 +264,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 +289,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 +393,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 +417,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 +459,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,1447 +541,1577 @@ 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; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kilobyte; + [Static] + [Export("kilobyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Kilobyte { get; } - // @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; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kibibyte; + [Static] + [Export("kibibyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Kibibyte { get; } - // @required @property (copy, nonatomic) NSString * _Nonnull origin; - [Abstract] - [Export("origin")] - string Origin { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull megabyte; + [Static] + [Export("megabyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Megabyte { get; } - // @required @property (copy, nonatomic) NSString * _Nullable spanDescription; - [Abstract] - [NullAllowed, Export("spanDescription")] - string SpanDescription { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull mebibyte; + [Static] + [Export("mebibyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Mebibyte { get; } - // @required @property (nonatomic) SentrySpanStatus status; - [Abstract] - [Export("status", ArgumentSemantic.Assign)] - SentrySpanStatus Status { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull gigabyte; + [Static] + [Export("gigabyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Gigabyte { get; } - // @required @property (nonatomic, strong) NSDate * _Nullable timestamp; - [Abstract] - [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] - NSDate Timestamp { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull gibibyte; + [Static] + [Export("gibibyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Gibibyte { get; } - // @required @property (nonatomic, strong) NSDate * _Nullable startTimestamp; - [Abstract] - [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] - NSDate StartTimestamp { get; set; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull terabyte; + [Static] + [Export("terabyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Terabyte { get; } - // @required @property (readonly) NSDictionary * _Nonnull data; - [Abstract] - [Export("data")] - NSDictionary Data { get; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull tebibyte; + [Static] + [Export("tebibyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Tebibyte { get; } - // @required @property (readonly) NSDictionary * _Nonnull tags; - [Abstract] - [Export("tags")] - NSDictionary Tags { get; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull petabyte; + [Static] + [Export("petabyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Petabyte { get; } - // @required @property (readonly) BOOL isFinished; - [Abstract] - [Export("isFinished")] - bool IsFinished { get; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull pebibyte; + [Static] + [Export("pebibyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Pebibyte { get; } - // @required @property (readonly, nonatomic) SentryTraceContext * _Nullable traceContext; - [Abstract] - [NullAllowed, Export("traceContext")] - SentryTraceContext TraceContext { get; } + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull exabyte; + [Static] + [Export("exabyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Exabyte { get; } - // @required -(id _Nonnull)startChildWithOperation:(NSString * _Nonnull)operation __attribute__((swift_name("startChild(operation:)"))); - [Abstract] - [Export("startChildWithOperation:")] - SentrySpan StartChildWithOperation(string operation); + // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull exbibyte; + [Static] + [Export("exbibyte", ArgumentSemantic.Copy)] + SentryMeasurementUnitInformation Exbibyte { get; } +} - // @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); +// @interface SentryMeasurementUnitFraction : SentryMeasurementUnit +[BaseType(typeof(SentryMeasurementUnit))] +[DisableDefaultCtor] +[Internal] +interface SentryMeasurementUnitFraction +{ + // @property (readonly, copy, class) SentryMeasurementUnitFraction * _Nonnull ratio; + [Static] + [Export("ratio", ArgumentSemantic.Copy)] + SentryMeasurementUnitFraction Ratio { get; } - // @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 (readonly, copy, class) SentryMeasurementUnitFraction * _Nonnull percent; + [Static] + [Export("percent", ArgumentSemantic.Copy)] + SentryMeasurementUnitFraction Percent { get; } +} - // @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); +// @interface SentryMechanism : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryMechanism : SentrySerializable +{ + // @property (copy, nonatomic) NSString * _Nonnull type; + [Export("type")] + string Type { get; set; } - // @required -(void)removeDataForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeData(key:)"))); - [Abstract] - [Export("removeDataForKey:")] - void RemoveDataForKey(string key); + // @property (copy, nonatomic) NSString * _Nullable desc; + [NullAllowed, Export("desc")] + string Desc { 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 (nonatomic, strong) NSDictionary * _Nullable data; + [NullAllowed, Export("data", ArgumentSemantic.Strong)] + NSDictionary Data { get; set; } - // @required -(void)removeTagForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeTag(key:)"))); - [Abstract] - [Export("removeTagForKey:")] - void RemoveTagForKey(string key); + // @property (copy, nonatomic) NSNumber * _Nullable handled; + [NullAllowed, Export("handled", ArgumentSemantic.Copy)] + NSNumber Handled { 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 (copy, nonatomic) NSNumber * _Nullable synthetic; + [NullAllowed, Export("synthetic", ArgumentSemantic.Copy)] + NSNumber Synthetic { 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 (copy, nonatomic) NSString * _Nullable helpLink; + [NullAllowed, Export("helpLink")] + string HelpLink { get; set; } - // @required -(void)finish; - [Abstract] - [Export("finish")] - void Finish(); + // @property (nonatomic, strong) SentryMechanismContext * _Nullable meta; + [NullAllowed, Export("meta", ArgumentSemantic.Strong)] + SentryMechanismContext Meta { get; set; } - // @required -(void)finishWithStatus:(SentrySpanStatus)status __attribute__((swift_name("finish(status:)"))); - [Abstract] - [Export("finishWithStatus:")] - void FinishWithStatus(SentrySpanStatus status); + // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type; + [Export("initWithType:")] + NativeHandle Constructor(string type); +} - // @required -(SentryTraceHeader * _Nonnull)toTraceHeader; - [Abstract] - [Export("toTraceHeader")] - SentryTraceHeader ToTraceHeader(); +// @interface SentryMechanismContext : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentryMechanismContext : SentrySerializable +{ + // @property (nonatomic, strong) NSDictionary * _Nullable signal; + [NullAllowed, Export("signal", ArgumentSemantic.Strong)] + NSDictionary Signal { get; set; } - // @required -(NSString * _Nullable)baggageHttpHeader; - [Abstract] - [NullAllowed, Export("baggageHttpHeader")] - string BaggageHttpHeader { get; } + // @property (nonatomic, strong) NSDictionary * _Nullable machException; + [NullAllowed, Export("machException", ArgumentSemantic.Strong)] + NSDictionary MachException { get; set; } - // @required -(NSDictionary * _Nonnull)serialize; - [Abstract] - [Export("serialize")] - NSDictionary Serialize(); + // @property (nonatomic, strong) SentryNSError * _Nullable error; + [NullAllowed, Export("error", ArgumentSemantic.Strong)] + SentryNSError Error { get; set; } } -// @interface SentryHub : NSObject +// @interface SentryMessage : NSObject [BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] -interface SentryHub +interface SentryMessage : SentrySerializable { - // -(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(); + // -(instancetype _Nonnull)initWithFormatted:(NSString * _Nonnull)formatted; + [Export("initWithFormatted:")] + NativeHandle Constructor(string formatted); - // -(void)endSessionWithTimestamp:(NSDate * _Nonnull)timestamp; - [Export("endSessionWithTimestamp:")] - void EndSessionWithTimestamp(NSDate timestamp); + // @property (readonly, copy, nonatomic) NSString * _Nonnull formatted; + [Export("formatted")] + string Formatted { get; } - // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event __attribute__((swift_name("capture(event:)"))); - [Export("captureEvent:")] - SentryId CaptureEvent(SentryEvent @event); + // @property (copy, nonatomic) NSString * _Nullable message; + [NullAllowed, Export("message")] + string Message { get; set; } - // -(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); + // @property (nonatomic, strong) NSArray * _Nullable params; + [NullAllowed, Export("params", ArgumentSemantic.Strong)] + string[] Params { get; set; } +} - // -(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); +// @interface SentryNSError : NSObject +[BaseType(typeof(NSObject))] +[DisableDefaultCtor] +[Internal] +interface SentryNSError : SentrySerializable +{ + // @property (copy, nonatomic) NSString * _Nonnull domain; + [Export("domain")] + string Domain { get; set; } - // -(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); + // @property (assign, nonatomic) NSInteger code; + [Export("code")] + nint Code { get; set; } - // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext __attribute__((swift_name("startTransaction(transactionContext:)"))); - [Export("startTransactionWithContext:")] - SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext); + // -(instancetype _Nonnull)initWithDomain:(NSString * _Nonnull)domain code:(NSInteger)code; + [Export("initWithDomain:code:")] + NativeHandle Constructor(string domain, nint code); +} - // -(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); +// @interface SentryReplayApi : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentryReplayApi +{ + // -(void)maskView:(UIView * _Nonnull)view __attribute__((swift_name("maskView(_:)"))); + [Export("maskView:")] + void MaskView(UIView view); - // -(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); + // -(void)unmaskView:(UIView * _Nonnull)view __attribute__((swift_name("unmaskView(_:)"))); + [Export("unmaskView:")] + void UnmaskView(UIView view); - // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error __attribute__((swift_name("capture(error:)"))); - [Export("captureError:")] - SentryId CaptureError(NSError error); + // -(void)pause; + [Export("pause")] + void Pause(); - // -(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); + // -(void)resume; + [Export("resume")] + void Resume(); - // -(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception __attribute__((swift_name("capture(exception:)"))); - [Export("captureException:")] - SentryId CaptureException(NSException exception); + // -(void)start; + [Export("start")] + void Start(); - // -(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); + // -(void)stop; + [Export("stop")] + void Stop(); - // -(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message __attribute__((swift_name("capture(message:)"))); - [Export("captureMessage:")] - SentryId CaptureMessage(string message); + // -(void)showMaskPreview; + [Export("showMaskPreview")] + void ShowMaskPreview(); - // -(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)showMaskPreview:(CGFloat)opacity; + [Export("showMaskPreview:")] + void ShowMaskPreview(nfloat opacity); - // -(void)captureFeedback:(SentryFeedback * _Nonnull)feedback; - [Export("captureFeedback:")] - void CaptureFeedback(SentryFeedback feedback); + // -(void)hideMaskPreview; + [Export("hideMaskPreview")] + void HideMaskPreview(); +} - // -(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback; - [Export("configureScope:")] - void ConfigureScope(Action callback); +// @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; } - // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb; - [Export("addBreadcrumb:")] - void AddBreadcrumb(SentryBreadcrumb crumb); + // @property (copy, nonatomic) NSString * _Nullable cookies; + [NullAllowed, Export("cookies")] + string Cookies { get; set; } - // -(SentryClient * _Nullable)getClient; - [NullAllowed, Export("getClient")] - SentryClient Client { get; } + // @property (nonatomic, strong) NSDictionary * _Nullable headers; + [NullAllowed, Export("headers", ArgumentSemantic.Strong)] + NSDictionary Headers { get; set; } - // @property (readonly, nonatomic, strong) SentryScope * _Nonnull scope; - [Export("scope", ArgumentSemantic.Strong)] - SentryScope Scope { get; } + // @property (copy, nonatomic) NSString * _Nullable fragment; + [NullAllowed, Export("fragment")] + string Fragment { get; set; } - // -(void)bindClient:(SentryClient * _Nullable)client; - [Export("bindClient:")] - void BindClient([NullAllowed] SentryClient client); + // @property (copy, nonatomic) NSString * _Nullable method; + [NullAllowed, Export("method")] + string Method { get; set; } - // -(BOOL)hasIntegration:(NSString * _Nonnull)integrationName; - [Export("hasIntegration:")] - bool HasIntegration(string integrationName); + // @property (copy, nonatomic) NSString * _Nullable queryString; + [NullAllowed, Export("queryString")] + string QueryString { get; set; } - // -(BOOL)isIntegrationInstalled:(Class _Nonnull)integrationClass; - [Export("isIntegrationInstalled:")] - bool IsIntegrationInstalled(Class integrationClass); + // @property (copy, nonatomic) NSString * _Nullable url; + [NullAllowed, Export("url")] + string Url { get; set; } +} - // -(void)setUser:(SentryUser * _Nullable)user; - [Export("setUser:")] - void SetUser([NullAllowed] SentryUser user); +// @interface SentrySamplingContext : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentrySamplingContext +{ + // @property (readonly, nonatomic) SentryTransactionContext * _Nonnull transactionContext; + [Export("transactionContext")] + SentryTransactionContext TransactionContext { get; } - // -(void)reportFullyDisplayed; - [Export("reportFullyDisplayed")] - void ReportFullyDisplayed(); + // @property (readonly, nonatomic) NSDictionary * _Nullable customSamplingContext; + [NullAllowed, Export("customSamplingContext")] + NSDictionary CustomSamplingContext { get; } - // -(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)"))); - [Export("flush:")] - void Flush(double timeout); + // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext; + [Export("initWithTransactionContext:")] + NativeHandle Constructor(SentryTransactionContext transactionContext); - // -(void)close; - [Export("close")] - void Close(); + // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; + [Export("initWithTransactionContext:customSamplingContext:")] + NativeHandle Constructor(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); } -// @interface SentryMeasurementUnit : NSObject +// @interface SentrySpanContext : NSObject [BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] -interface SentryMeasurementUnit +interface SentrySpanContext : SentrySerializable { - // -(instancetype _Nonnull)initWithUnit:(NSString * _Nonnull)unit; - [Export("initWithUnit:")] - NativeHandle Constructor(string unit); + // @property (readonly, nonatomic) SentryId * _Nonnull traceId; + [Export("traceId")] + SentryId TraceId { get; } - // @property (readonly, copy) NSString * _Nonnull unit; - [Export("unit")] - string Unit { get; } + // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; + [Export("spanId")] + SentrySpanId SpanId { get; } - // @property (readonly, copy, class) SentryMeasurementUnit * _Nonnull none; - [Static] - [Export("none", ArgumentSemantic.Copy)] - SentryMeasurementUnit None { get; } -} + // @property (readonly, nonatomic) SentrySpanId * _Nullable parentSpanId; + [NullAllowed, Export("parentSpanId")] + SentrySpanId ParentSpanId { 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, nonatomic) SentrySampleDecision sampled; + [Export("sampled")] + SentrySampleDecision Sampled { get; } - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull microsecond; - [Static] - [Export("microsecond", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Microsecond { get; } + // @property (readonly, copy, nonatomic) NSString * _Nonnull operation; + [Export("operation")] + string Operation { get; } - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull millisecond; - [Static] - [Export("millisecond", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Millisecond { get; } + // @property (readonly, copy, nonatomic) NSString * _Nullable spanDescription; + [NullAllowed, Export("spanDescription")] + string SpanDescription { get; } - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull second; - [Static] - [Export("second", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Second { get; } + // @property (copy, nonatomic) NSString * _Nonnull origin; + [Export("origin")] + string Origin { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull minute; - [Static] - [Export("minute", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Minute { get; } + // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation; + [Export("initWithOperation:")] + NativeHandle Constructor(string operation); - // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull hour; - [Static] - [Export("hour", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Hour { 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 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 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 week; - [Static] - [Export("week", ArgumentSemantic.Copy)] - SentryMeasurementUnitDuration Week { 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); } -// @interface SentryMeasurementUnitInformation : SentryMeasurementUnit -[BaseType(typeof(SentryMeasurementUnit))] -[DisableDefaultCtor] +// @protocol SentrySpan +[Protocol] [Internal] -interface SentryMeasurementUnitInformation +[Model] +[BaseType (typeof(NSObject))] +interface SentrySpan : SentrySerializable { - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull bit; - [Static] - [Export("bit", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Bit { get; } + // @required @property (nonatomic, strong) SentryId * _Nonnull traceId; + [Abstract] + [Export("traceId", ArgumentSemantic.Strong)] + SentryId TraceId { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull byte; - [Static] - [Export("byte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Byte { get; } + // @required @property (nonatomic, strong) SentrySpanId * _Nonnull spanId; + [Abstract] + [Export("spanId", ArgumentSemantic.Strong)] + SentrySpanId SpanId { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kilobyte; - [Static] - [Export("kilobyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Kilobyte { get; } + // @required @property (nonatomic, strong) SentrySpanId * _Nullable parentSpanId; + [Abstract] + [NullAllowed, Export("parentSpanId", ArgumentSemantic.Strong)] + SentrySpanId ParentSpanId { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kibibyte; - [Static] - [Export("kibibyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Kibibyte { get; } + // @required @property (nonatomic) SentrySampleDecision sampled; + [Abstract] + [Export("sampled", ArgumentSemantic.Assign)] + SentrySampleDecision Sampled { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull megabyte; - [Static] - [Export("megabyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Megabyte { get; } + // @required @property (copy, nonatomic) NSString * _Nonnull operation; + [Abstract] + [Export("operation")] + string Operation { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull mebibyte; - [Static] - [Export("mebibyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Mebibyte { get; } + // @required @property (copy, nonatomic) NSString * _Nonnull origin; + [Abstract] + [Export("origin")] + string Origin { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull gigabyte; - [Static] - [Export("gigabyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Gigabyte { get; } + // @required @property (copy, nonatomic) NSString * _Nullable spanDescription; + [Abstract] + [NullAllowed, Export("spanDescription")] + string SpanDescription { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull gibibyte; - [Static] - [Export("gibibyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Gibibyte { get; } + // @required @property (nonatomic) SentrySpanStatus status; + [Abstract] + [Export("status", ArgumentSemantic.Assign)] + SentrySpanStatus Status { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull terabyte; - [Static] - [Export("terabyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Terabyte { get; } + // @required @property (nonatomic, strong) NSDate * _Nullable timestamp; + [Abstract] + [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] + NSDate Timestamp { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull tebibyte; - [Static] - [Export("tebibyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Tebibyte { get; } + // @required @property (nonatomic, strong) NSDate * _Nullable startTimestamp; + [Abstract] + [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] + NSDate StartTimestamp { get; set; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull petabyte; - [Static] - [Export("petabyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Petabyte { get; } + // @required @property (readonly) NSDictionary * _Nonnull data; + [Abstract] + [Export("data")] + NSDictionary Data { get; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull pebibyte; - [Static] - [Export("pebibyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Pebibyte { get; } + // @required @property (readonly) NSDictionary * _Nonnull tags; + [Abstract] + [Export("tags")] + NSDictionary Tags { get; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull exabyte; - [Static] - [Export("exabyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Exabyte { get; } + // @required @property (readonly) BOOL isFinished; + [Abstract] + [Export("isFinished")] + bool IsFinished { get; } - // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull exbibyte; - [Static] - [Export("exbibyte", ArgumentSemantic.Copy)] - SentryMeasurementUnitInformation Exbibyte { 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)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 SentryMeasurementUnitFraction : SentryMeasurementUnit -[BaseType(typeof(SentryMeasurementUnit))] -[DisableDefaultCtor] +// @interface SentryScope : NSObject +[BaseType(typeof(NSObject))] [Internal] -interface SentryMeasurementUnitFraction +partial interface SentryScope : SentrySerializable { - // @property (readonly, copy, class) SentryMeasurementUnitFraction * _Nonnull ratio; - [Static] - [Export("ratio", ArgumentSemantic.Copy)] - SentryMeasurementUnitFraction Ratio { get; } + // @property (nonatomic, strong) id _Nullable span; + [NullAllowed, Export("span", ArgumentSemantic.Strong)] + SentrySpan Span { get; set; } + + // @property (nonatomic, strong) NSString * _Nullable replayId; + [NullAllowed, Export("replayId", ArgumentSemantic.Strong)] + string ReplayId { get; set; } + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull tags; + [Export("tags", ArgumentSemantic.Copy)] + NSDictionary Tags { get; } + + // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull attributes; + [Export("attributes", ArgumentSemantic.Copy)] + NSDictionary Attributes { get; } + + // -(instancetype _Nonnull)initWithMaxBreadcrumbs:(NSInteger)maxBreadcrumbs __attribute__((objc_designated_initializer)); + [Export("initWithMaxBreadcrumbs:")] + [DesignatedInitializer] + NativeHandle Constructor(nint maxBreadcrumbs); + + // -(instancetype _Nonnull)initWithScope:(SentryScope * _Nonnull)scope; + [Export("initWithScope:")] + NativeHandle Constructor(SentryScope scope); + + // -(void)setUser:(SentryUser * _Nullable)user; + [Export("setUser:")] + void SetUser([NullAllowed] SentryUser user); + + // -(void)setTagValue:(NSString * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setTag(value:key:)"))); + [Export("setTagValue:forKey:")] + void SetTagValue(string value, string key); + + // -(void)removeTagForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeTag(key:)"))); + [Export("removeTagForKey:")] + void RemoveTagForKey(string key); + + // -(void)setTags:(NSDictionary * _Nullable)tags; + [Export("setTags:")] + void SetTags([NullAllowed] NSDictionary tags); + + // -(void)setExtras:(NSDictionary * _Nullable)extras; + [Export("setExtras:")] + void SetExtras([NullAllowed] NSDictionary extras); + + // -(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); + + // -(void)removeExtraForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeExtra(key:)"))); + [Export("removeExtraForKey:")] + void RemoveExtraForKey(string key); + + // -(void)setDist:(NSString * _Nullable)dist; + [Export("setDist:")] + void SetDist([NullAllowed] string dist); + + // -(void)setEnvironment:(NSString * _Nullable)environment; + [Export("setEnvironment:")] + void SetEnvironment([NullAllowed] string environment); - // @property (readonly, copy, class) SentryMeasurementUnitFraction * _Nonnull percent; - [Static] - [Export("percent", ArgumentSemantic.Copy)] - SentryMeasurementUnitFraction Percent { get; } -} + // -(void)setFingerprint:(NSArray * _Nullable)fingerprint; + [Export("setFingerprint:")] + void SetFingerprint([NullAllowed] string[] fingerprint); -// @interface SentryMechanism : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryMechanism : SentrySerializable -{ - // @property (copy, nonatomic) NSString * _Nonnull type; - [Export("type")] - string Type { get; set; } + // -(void)setLevel:(SentryLevel)level; + [Export("setLevel:")] + void SetLevel(SentryLevel level); - // @property (copy, nonatomic) NSString * _Nullable desc; - [NullAllowed, Export("desc")] - string Desc { get; set; } + // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb __attribute__((swift_name("addBreadcrumb(_:)"))); + [Export("addBreadcrumb:")] + void AddBreadcrumb(SentryBreadcrumb crumb); - // @property (nonatomic, strong) NSDictionary * _Nullable data; - [NullAllowed, Export("data", ArgumentSemantic.Strong)] - NSDictionary Data { get; set; } + // -(void)clearBreadcrumbs; + [Export("clearBreadcrumbs")] + void ClearBreadcrumbs(); - // @property (copy, nonatomic) NSNumber * _Nullable handled; - [NullAllowed, Export("handled", ArgumentSemantic.Copy)] - NSNumber Handled { get; set; } + // -(NSDictionary * _Nonnull)serialize; + [Export("serialize")] + NSDictionary Serialize(); - // @property (copy, nonatomic) NSNumber * _Nullable synthetic; - [NullAllowed, Export("synthetic", ArgumentSemantic.Copy)] - NSNumber Synthetic { 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 (copy, nonatomic) NSString * _Nullable helpLink; - [NullAllowed, Export("helpLink")] - string HelpLink { get; set; } + // -(void)removeContextForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeContext(key:)"))); + [Export("removeContextForKey:")] + void RemoveContextForKey(string key); - // @property (nonatomic, strong) SentryMechanismMeta * _Nullable meta; - [NullAllowed, Export("meta", ArgumentSemantic.Strong)] - SentryMechanismMeta Meta { get; set; } + // -(void)addAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((swift_name("addAttachment(_:)"))); + [Export("addAttachment:")] + void AddAttachment(SentryAttachment attachment); - // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type; - [Export("initWithType:")] - NativeHandle Constructor(string type); -} + // -(void)setAttributeValue:(id _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setAttribute(value:key:)"))); + [Export("setAttributeValue:forKey:")] + void SetAttributeValue(NSObject value, string key); -// @interface SentryMechanismMeta : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentryMechanismMeta : SentrySerializable -{ - // @property (nonatomic, strong) NSDictionary * _Nullable signal; - [NullAllowed, Export("signal", ArgumentSemantic.Strong)] - NSDictionary Signal { get; set; } + // -(void)removeAttributeForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeAttribute(key:)"))); + [Export("removeAttributeForKey:")] + void RemoveAttributeForKey(string key); - // @property (nonatomic, strong) NSDictionary * _Nullable machException; - [NullAllowed, Export("machException", ArgumentSemantic.Strong)] - NSDictionary MachException { get; set; } + // -(void)clearAttachments; + [Export("clearAttachments")] + void ClearAttachments(); - // @property (nonatomic, strong) SentryNSError * _Nullable error; - [NullAllowed, Export("error", ArgumentSemantic.Strong)] - SentryNSError Error { get; set; } + // -(void)clear; + [Export("clear")] + void Clear(); } -// @interface SentryMessage : NSObject +// @interface SentrySpanId : NSObject [BaseType(typeof(NSObject))] -[DisableDefaultCtor] [Internal] -interface SentryMessage : SentrySerializable +interface SentrySpanId { - // -(instancetype _Nonnull)initWithFormatted:(NSString * _Nonnull)formatted; - [Export("initWithFormatted:")] - NativeHandle Constructor(string formatted); + // -(instancetype _Nonnull)initWithUUID:(NSUUID * _Nonnull)uuid; + [Export("initWithUUID:")] + NativeHandle Constructor(NSUuid uuid); - // @property (readonly, copy, nonatomic) NSString * _Nonnull formatted; - [Export("formatted")] - string Formatted { get; } + // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value; + [Export("initWithValue:")] + NativeHandle Constructor(string value); - // @property (copy, nonatomic) NSString * _Nullable message; - [NullAllowed, Export("message")] - string Message { get; set; } + // @property (readonly, copy) NSString * _Nonnull sentrySpanIdString; + [Export("sentrySpanIdString")] + string SentrySpanIdString { get; } - // @property (nonatomic, strong) NSArray * _Nullable params; - [NullAllowed, Export("params", ArgumentSemantic.Strong)] - string[] Params { get; set; } + // @property (readonly, nonatomic, strong, class) SentrySpanId * _Nonnull empty; + [Static] + [Export("empty", ArgumentSemantic.Strong)] + SentrySpanId Empty { get; } } -// @interface SentryNSError : NSObject +// @interface SentryStacktrace : NSObject [BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] -interface SentryNSError : SentrySerializable +interface SentryStacktrace : SentrySerializable { - // @property (copy, nonatomic) NSString * _Nonnull domain; - [Export("domain")] - string Domain { get; set; } + // @property (nonatomic, strong) NSArray * _Nonnull frames; + [Export("frames", ArgumentSemantic.Strong)] + SentryFrame[] Frames { get; set; } - // @property (assign, nonatomic) NSInteger code; - [Export("code")] - nint Code { get; set; } + // @property (nonatomic, strong) NSDictionary * _Nonnull registers; + [Export("registers", ArgumentSemantic.Strong)] + NSDictionary Registers { get; set; } - // -(instancetype _Nonnull)initWithDomain:(NSString * _Nonnull)domain code:(NSInteger)code; - [Export("initWithDomain:code:")] - NativeHandle Constructor(string domain, nint code); + // @property (copy, nonatomic) NSNumber * _Nullable snapshot; + [NullAllowed, Export("snapshot", ArgumentSemantic.Copy)] + NSNumber Snapshot { get; set; } + + // -(instancetype _Nonnull)initWithFrames:(NSArray * _Nonnull)frames registers:(NSDictionary * _Nonnull)registers; + [Export("initWithFrames:registers:")] + NativeHandle Constructor(SentryFrame[] frames, NSDictionary registers); + + // -(void)fixDuplicateFrames; + [Export("fixDuplicateFrames")] + void FixDuplicateFrames(); } -// @interface SentryOptions : NSObject +// @interface SentryThread : NSObject [BaseType(typeof(NSObject))] +[DisableDefaultCtor] [Internal] -interface SentryOptions +interface SentryThread : SentrySerializable { - // @property (nonatomic, strong) NSString * _Nullable dsn; - [NullAllowed, Export("dsn", ArgumentSemantic.Strong)] - string Dsn { get; set; } - - // @property (nonatomic, strong) SentryDsn * _Nullable parsedDsn; - [NullAllowed, Export("parsedDsn", ArgumentSemantic.Strong)] - SentryDsn ParsedDsn { get; set; } - - // @property (assign, nonatomic) BOOL debug; - [Export("debug")] - bool Debug { get; set; } - - // @property (assign, 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 dist; - [NullAllowed, Export("dist")] - string Dist { get; set; } - - // @property (copy, nonatomic) NSString * _Nonnull environment; - [Export("environment")] - string Environment { get; set; } - - // @property (assign, nonatomic) BOOL enabled; - [Export("enabled")] - bool Enabled { get; set; } - - // @property (assign, nonatomic) NSTimeInterval shutdownTimeInterval; - [Export("shutdownTimeInterval")] - double ShutdownTimeInterval { get; set; } - - // @property (assign, nonatomic) BOOL enableCrashHandler; - [Export("enableCrashHandler")] - bool EnableCrashHandler { get; set; } - - // @property (assign, nonatomic) BOOL enableSigtermReporting; - [Export("enableSigtermReporting")] - bool EnableSigtermReporting { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable threadId; + [NullAllowed, Export("threadId", ArgumentSemantic.Copy)] + NSNumber ThreadId { get; set; } - // @property (assign, nonatomic) NSUInteger maxBreadcrumbs; - [Export("maxBreadcrumbs")] - nuint MaxBreadcrumbs { get; set; } + // @property (copy, nonatomic) NSString * _Nullable name; + [NullAllowed, Export("name")] + string Name { get; set; } - // @property (assign, nonatomic) BOOL enableNetworkBreadcrumbs; - [Export("enableNetworkBreadcrumbs")] - bool EnableNetworkBreadcrumbs { get; set; } + // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; + [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] + SentryStacktrace Stacktrace { get; set; } - // @property (assign, nonatomic) NSUInteger maxCacheItems; - [Export("maxCacheItems")] - nuint MaxCacheItems { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable crashed; + [NullAllowed, Export("crashed", ArgumentSemantic.Copy)] + NSNumber Crashed { get; set; } - // @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend; - [NullAllowed, Export("beforeSend", ArgumentSemantic.Copy)] - SentryBeforeSendEventCallback BeforeSend { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable current; + [NullAllowed, Export("current", ArgumentSemantic.Copy)] + NSNumber Current { get; set; } - // @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan; - [NullAllowed, Export("beforeSendSpan", ArgumentSemantic.Copy)] - SentryBeforeSendSpanCallback BeforeSendSpan { get; set; } + // @property (copy, nonatomic) NSNumber * _Nullable isMain; + [NullAllowed, Export("isMain", ArgumentSemantic.Copy)] + NSNumber IsMain { get; set; } - // @property (copy, nonatomic) SentryBeforeSendLogCallback _Nullable beforeSendLog; - [NullAllowed, Export("beforeSendLog", ArgumentSemantic.Copy)] - SentryBeforeSendLogCallback BeforeSendLog { get; set; } + // -(instancetype _Nonnull)initWithThreadId:(NSNumber * _Nullable)threadId; + [Export("initWithThreadId:")] + NativeHandle Constructor([NullAllowed] NSNumber threadId); +} - // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb; - [NullAllowed, Export("beforeBreadcrumb", ArgumentSemantic.Copy)] - SentryBeforeBreadcrumbCallback BeforeBreadcrumb { 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) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureScreenshot; - [NullAllowed, Export("beforeCaptureScreenshot", ArgumentSemantic.Copy)] - SentryBeforeCaptureScreenshotCallback BeforeCaptureScreenshot { get; set; } + // @property (readonly, nonatomic) NSString * _Nonnull publicKey; + [Export("publicKey")] + string PublicKey { get; } - // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureViewHierarchy; - [NullAllowed, Export("beforeCaptureViewHierarchy", ArgumentSemantic.Copy)] - SentryBeforeCaptureScreenshotCallback BeforeCaptureViewHierarchy { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable releaseName; + [NullAllowed, Export("releaseName")] + string ReleaseName { get; } - // @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun; - [NullAllowed, Export("onCrashedLastRun", ArgumentSemantic.Copy)] - SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable environment; + [NullAllowed, Export("environment")] + string Environment { get; } - // @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; } + // @property (readonly, nonatomic) NSString * _Nullable transaction; + [NullAllowed, Export("transaction")] + string Transaction { get; } - // +(NSArray * _Nonnull)defaultIntegrations; - [Static] - [Export("defaultIntegrations")] - string[] DefaultIntegrations { get; } + // @property (readonly, nonatomic) NSString * _Nullable sampleRate; + [NullAllowed, Export("sampleRate")] + string SampleRate { get; } - // @property (copy, nonatomic) NSNumber * _Nullable sampleRate; - [NullAllowed, Export("sampleRate", ArgumentSemantic.Copy)] - NSNumber SampleRate { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable sampleRand; + [NullAllowed, Export("sampleRand")] + string SampleRand { get; } - // @property (assign, nonatomic) BOOL enableAutoSessionTracking; - [Export("enableAutoSessionTracking")] - bool EnableAutoSessionTracking { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable sampled; + [NullAllowed, Export("sampled")] + string Sampled { get; } - // @property (assign, nonatomic) BOOL enableGraphQLOperationTracking; - [Export("enableGraphQLOperationTracking")] - bool EnableGraphQLOperationTracking { get; set; } + // @property (readonly, nonatomic) NSString * _Nullable replayId; + [NullAllowed, Export("replayId")] + string ReplayId { get; } - // @property (assign, nonatomic) BOOL enableWatchdogTerminationTracking; - [Export("enableWatchdogTerminationTracking")] - bool EnableWatchdogTerminationTracking { get; set; } + // -(SentryBaggage * _Nonnull)toBaggage; + [Export("toBaggage")] + SentryBaggage ToBaggage(); +} - // @property (assign, nonatomic) NSUInteger sessionTrackingIntervalMillis; - [Export("sessionTrackingIntervalMillis")] - nuint SessionTrackingIntervalMillis { 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) BOOL attachStacktrace; - [Export("attachStacktrace")] - bool AttachStacktrace { get; set; } + // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; + [Export("spanId")] + SentrySpanId SpanId { get; } - // @property (assign, nonatomic) NSUInteger maxAttachmentSize; - [Export("maxAttachmentSize")] - nuint MaxAttachmentSize { get; set; } + // @property (readonly, nonatomic) SentrySampleDecision sampled; + [Export("sampled")] + SentrySampleDecision Sampled { get; } - // @property (assign, nonatomic) BOOL sendDefaultPii; - [Export("sendDefaultPii")] - bool SendDefaultPii { 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 enableAutoPerformanceTracing; - [Export("enableAutoPerformanceTracing")] - bool EnableAutoPerformanceTracing { get; set; } + // -(NSString * _Nonnull)value; + [Export("value")] + string Value { get; } +} - // @property (assign, nonatomic) BOOL enablePerformanceV2; - [Export("enablePerformanceV2")] - bool EnablePerformanceV2 { get; set; } +// @interface SentryTransactionContext : SentrySpanContext +[BaseType(typeof(SentrySpanContext))] +[DisableDefaultCtor] +[Internal] +interface SentryTransactionContext +{ + // @property (readonly, nonatomic) NSString * _Nonnull name; + [Export("name")] + string Name { get; } - // @property (assign, nonatomic) BOOL enablePersistingTracesWhenCrashing; - [Export("enablePersistingTracesWhenCrashing")] - bool EnablePersistingTracesWhenCrashing { get; set; } + // @property (readonly, nonatomic) SentryTransactionNameSource nameSource; + [Export("nameSource")] + SentryTransactionNameSource NameSource { get; } - // @property (nonatomic) SentryScope * _Nonnull (^ _Nonnull)(SentryScope * _Nonnull) initialScope; - [Export("initialScope", ArgumentSemantic.Assign)] - Func InitialScope { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable sampleRate; + [NullAllowed, Export("sampleRate", ArgumentSemantic.Strong)] + NSNumber SampleRate { get; set; } - // @property (assign, nonatomic) BOOL enableUIViewControllerTracing; - [Export("enableUIViewControllerTracing")] - bool EnableUIViewControllerTracing { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable sampleRand; + [NullAllowed, Export("sampleRand", ArgumentSemantic.Strong)] + NSNumber SampleRand { get; set; } - // @property (assign, nonatomic) BOOL attachScreenshot; - [Export("attachScreenshot")] - bool AttachScreenshot { get; set; } + // @property (nonatomic) SentrySampleDecision parentSampled; + [Export("parentSampled", ArgumentSemantic.Assign)] + SentrySampleDecision ParentSampled { get; set; } - // @property (nonatomic, strong) SentryViewScreenshotOptions * _Nonnull screenshot; - [Export("screenshot", ArgumentSemantic.Strong)] - SentryViewScreenshotOptions Screenshot { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRate; + [NullAllowed, Export("parentSampleRate", ArgumentSemantic.Strong)] + NSNumber ParentSampleRate { get; set; } - // @property (assign, nonatomic) BOOL attachViewHierarchy; - [Export("attachViewHierarchy")] - bool AttachViewHierarchy { get; set; } + // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRand; + [NullAllowed, Export("parentSampleRand", ArgumentSemantic.Strong)] + NSNumber ParentSampleRand { get; set; } - // @property (assign, nonatomic) BOOL reportAccessibilityIdentifier; - [Export("reportAccessibilityIdentifier")] - bool ReportAccessibilityIdentifier { get; set; } + // @property (assign, nonatomic) BOOL forNextAppLaunch; + [Export("forNextAppLaunch")] + bool ForNextAppLaunch { get; set; } - // @property (assign, nonatomic) BOOL enableUserInteractionTracing; - [Export("enableUserInteractionTracing")] - bool EnableUserInteractionTracing { get; set; } + // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; + [Export("initWithName:operation:")] + NativeHandle Constructor(string name, string operation); - // @property (assign, nonatomic) NSTimeInterval idleTimeout; - [Export("idleTimeout")] - double IdleTimeout { get; set; } + // -(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); - // @property (assign, nonatomic) BOOL enablePreWarmedAppStartTracing; - [Export("enablePreWarmedAppStartTracing")] - bool EnablePreWarmedAppStartTracing { get; set; } + // -(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); +} - // @property (nonatomic, strong) SentryReplayOptions * _Nonnull sessionReplay; - [Export("sessionReplay", ArgumentSemantic.Strong)] - SentryReplayOptions SessionReplay { get; set; } +// @interface SentryUser : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface SentryUser : SentrySerializable +{ + // @property (copy, atomic) NSString * _Nullable userId; + [NullAllowed, Export("userId")] + string UserId { get; set; } - // @property (assign, nonatomic) BOOL enableNetworkTracking; - [Export("enableNetworkTracking")] - bool EnableNetworkTracking { get; set; } + // @property (copy, atomic) NSString * _Nullable email; + [NullAllowed, Export("email")] + string Email { get; set; } - // @property (assign, nonatomic) BOOL enableFileIOTracing; - [Export("enableFileIOTracing")] - bool EnableFileIOTracing { get; set; } + // @property (copy, atomic) NSString * _Nullable username; + [NullAllowed, Export("username")] + string Username { get; set; } - // @property (nonatomic) BOOL enableTracing __attribute__((deprecated("Use tracesSampleRate or tracesSampler instead"))); - [Export("enableTracing")] - bool EnableTracing { get; set; } + // @property (copy, atomic) NSString * _Nullable ipAddress; + [NullAllowed, Export("ipAddress")] + string IpAddress { get; set; } - // @property (nonatomic, strong) NSNumber * _Nullable tracesSampleRate; - [NullAllowed, Export("tracesSampleRate", ArgumentSemantic.Strong)] - NSNumber TracesSampleRate { get; set; } + // @property (copy, atomic) NSString * _Nullable name; + [NullAllowed, Export("name")] + string Name { get; set; } - // @property (nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler; - [NullAllowed, Export("tracesSampler", ArgumentSemantic.Assign)] - SentryTracesSamplerCallback TracesSampler { get; set; } + // @property (nonatomic, strong) SentryGeo * _Nullable geo; + [NullAllowed, Export("geo", ArgumentSemantic.Strong)] + SentryGeo Geo { get; set; } - // @property (readonly, assign, nonatomic) BOOL isTracingEnabled; - [Export("isTracingEnabled")] - bool IsTracingEnabled { get; } + // @property (atomic, strong) NSDictionary * _Nullable data; + [NullAllowed, Export("data", ArgumentSemantic.Strong)] + NSDictionary Data { get; set; } - // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppIncludes; - [Export("inAppIncludes", ArgumentSemantic.Copy)] - string[] InAppIncludes { get; } + // -(instancetype _Nonnull)initWithUserId:(NSString * _Nonnull)userId; + [Export("initWithUserId:")] + NativeHandle Constructor(string userId); - // -(void)addInAppInclude:(NSString * _Nonnull)inAppInclude; - [Export("addInAppInclude:")] - void AddInAppInclude(string inAppInclude); + // -(BOOL)isEqualToUser:(SentryUser * _Nonnull)user; + [Export("isEqualToUser:")] + bool IsEqualToUser(SentryUser user); - // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppExcludes; - [Export("inAppExcludes", ArgumentSemantic.Copy)] - string[] InAppExcludes { get; } + // -(NSUInteger)hash; + [Export("hash")] + nuint Hash { get; } +} - // -(void)addInAppExclude:(NSString * _Nonnull)inAppExclude; - [Export("addInAppExclude:")] - void AddInAppExclude(string inAppExclude); +// @interface PrivateSentrySDKOnly : NSObject +[BaseType(typeof(NSObject))] +[Internal] +interface PrivateSentrySDKOnly +{ - [Wrap("WeakUrlSessionDelegate")] - [NullAllowed] - NSUrlSessionDelegate UrlSessionDelegate { get; set; } + // +(void)setSdkName:(NSString * _Nonnull)sdkName andVersionString:(NSString * _Nonnull)versionString; + [Static] + [Export("setSdkName:andVersionString:")] + void SetSdkName(string sdkName, string versionString); - // @property (nonatomic, weak) id _Nullable urlSessionDelegate; - [NullAllowed, Export("urlSessionDelegate", ArgumentSemantic.Weak)] - NSObject WeakUrlSessionDelegate { get; set; } + // +(void)setSdkName:(NSString * _Nonnull)sdkName; + [Static] + [Export("setSdkName:")] + void SetSdkName(string sdkName); - // @property (nonatomic, strong) NSURLSession * _Nullable urlSession; - [NullAllowed, Export("urlSession", ArgumentSemantic.Strong)] - NSUrlSession UrlSession { get; set; } + // +(NSString * _Nonnull)getSdkName; + [Static] + [Export("getSdkName")] + string SdkName { get; } - // @property (assign, nonatomic) BOOL enableSwizzling; - [Export("enableSwizzling")] - bool EnableSwizzling { get; set; } + // +(NSString * _Nonnull)getSdkVersionString; + [Static] + [Export("getSdkVersionString")] + string SdkVersionString { get; } - // @property (nonatomic, strong) NSSet * _Nonnull swizzleClassNameExcludes; - [Export("swizzleClassNameExcludes", ArgumentSemantic.Strong)] - NSSet SwizzleClassNameExcludes { get; set; } + // +(void)addSdkPackage:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; + [Static] + [Export("addSdkPackage:version:")] + void AddSdkPackage(string name, string version); - // @property (assign, nonatomic) BOOL enableCoreDataTracing; - [Export("enableCoreDataTracing")] - bool EnableCoreDataTracing { get; set; } + // +(NSDictionary * _Nonnull)getExtraContext; + [Static] + [Export("getExtraContext")] + NSDictionary ExtraContext { get; } - // @property (copy, nonatomic) SentryProfilingConfigurationBlock _Nullable configureProfiling; - [NullAllowed, Export("configureProfiling", ArgumentSemantic.Copy)] - SentryProfilingConfigurationBlock ConfigureProfiling { get; set; } + // +(void)setTrace:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId; + [Static] + [Export("setTrace:spanId:")] + void SetTrace(SentryId traceId, SentrySpanId spanId); - // @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; } + // +(uint64_t)startProfilerForTrace:(SentryId * _Nonnull)traceId; + [Static] + [Export("startProfilerForTrace:")] + ulong StartProfilerForTrace(SentryId traceId); - // @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; } + // +(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); - // @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; } + // +(void)discardProfilerForTrace:(SentryId * _Nonnull)traceId; + [Static] + [Export("discardProfilerForTrace:")] + void DiscardProfilerForTrace(SentryId traceId); - // @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, copy, nonatomic, class) NSString * _Nonnull installationID; + [Static] + [Export("installationID")] + string InstallationID { 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, copy, nonatomic, class) SentryOptions * _Nonnull options; + [Static] + [Export("options", ArgumentSemantic.Copy)] + SentryOptions Options { get; } - // @property (assign, nonatomic) BOOL sendClientReports; - [Export("sendClientReports")] - bool SendClientReports { get; set; } + // @property (assign, nonatomic, class) BOOL framesTrackingMeasurementHybridSDKMode; + [Static] + [Export("framesTrackingMeasurementHybridSDKMode")] + bool FramesTrackingMeasurementHybridSDKMode { get; set; } - // @property (assign, nonatomic) BOOL enableAppHangTracking; - [Export("enableAppHangTracking")] - bool EnableAppHangTracking { get; set; } + // @property (readonly, assign, nonatomic, class) BOOL isFramesTrackingRunning; + [Static] + [Export("isFramesTrackingRunning")] + bool IsFramesTrackingRunning { get; } - // @property (assign, nonatomic) BOOL enableAppHangTrackingV2; - [Export("enableAppHangTrackingV2")] - bool EnableAppHangTrackingV2 { get; set; } + // @property (readonly, assign, nonatomic, class) SentryScreenFrames * _Nonnull currentScreenFrames; + [Static] + [Export("currentScreenFrames", ArgumentSemantic.Assign)] + SentryScreenFrames CurrentScreenFrames { get; } - // @property (assign, nonatomic) BOOL enableReportNonFullyBlockingAppHangs; - [Export("enableReportNonFullyBlockingAppHangs")] - bool EnableReportNonFullyBlockingAppHangs { get; set; } + // +(NSArray * _Nullable)captureScreenshots; + [Static] + [Export("captureScreenshots")] + [return: NullAllowed] + NSData[] CaptureScreenshots(); - // @property (assign, nonatomic) NSTimeInterval appHangTimeoutInterval; - [Export("appHangTimeoutInterval")] - double AppHangTimeoutInterval { get; set; } + // +(NSData * _Nullable)captureViewHierarchy; + [Static] + [Export("captureViewHierarchy")] + [return: NullAllowed] + NSData CaptureViewHierarchy(); - // @property (assign, nonatomic) BOOL enableAutoBreadcrumbTracking; - [Export("enableAutoBreadcrumbTracking")] - bool EnableAutoBreadcrumbTracking { get; set; } + // +(void)setCurrentScreen:(NSString * _Nullable)screenName; + [Static] + [Export("setCurrentScreen:")] + void SetCurrentScreen([NullAllowed] string screenName); - // @property (retain, nonatomic) NSArray * _Nonnull tracePropagationTargets; - [Export("tracePropagationTargets", ArgumentSemantic.Retain)] - NSObject[] TracePropagationTargets { get; set; } + // +(UIView * _Nonnull)sessionReplayMaskingOverlay:(id _Nonnull)options; + [Static] + [Export("sessionReplayMaskingOverlay:")] + UIView SessionReplayMaskingOverlay(SentryRedactOptions options); - // @property (assign, nonatomic) BOOL enableCaptureFailedRequests; - [Export("enableCaptureFailedRequests")] - bool EnableCaptureFailedRequests { get; set; } + // +(void)configureSessionReplayWith:(id _Nullable)breadcrumbConverter screenshotProvider:(id _Nullable)screenshotProvider; + [Static] + [Export("configureSessionReplayWith:screenshotProvider:")] + void ConfigureSessionReplayWith([NullAllowed] SentryReplayBreadcrumbConverter breadcrumbConverter, [NullAllowed] SentryViewScreenshotProvider screenshotProvider); - // @property (nonatomic, strong) NSArray * _Nonnull failedRequestStatusCodes; - [Export("failedRequestStatusCodes", ArgumentSemantic.Strong)] - SentryHttpStatusCodeRange[] FailedRequestStatusCodes { get; set; } + // +(void)captureReplay; + [Static] + [Export("captureReplay")] + void CaptureReplay(); - // @property (nonatomic, strong) NSArray * _Nonnull failedRequestTargets; - [Export("failedRequestTargets", ArgumentSemantic.Strong)] - NSObject[] FailedRequestTargets { get; set; } + // +(NSString * _Nullable)getReplayId; + [Static] + [NullAllowed, Export("getReplayId")] + string ReplayId { 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; } + // +(void)addReplayIgnoreClasses:(NSArray * _Nonnull)classes; + [Static] + [Export("addReplayIgnoreClasses:")] + void AddReplayIgnoreClasses(Class[] classes); - // @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; } + // +(void)addReplayRedactClasses:(NSArray * _Nonnull)classes; + [Static] + [Export("addReplayRedactClasses:")] + void AddReplayRedactClasses(Class[] classes); - // @property (nonatomic) BOOL enableTimeToFullDisplayTracing; - [Export("enableTimeToFullDisplayTracing")] - bool EnableTimeToFullDisplayTracing { get; set; } + // +(void)setIgnoreContainerClass:(Class _Nonnull)containerClass; + [Static] + [Export("setIgnoreContainerClass:")] + void SetIgnoreContainerClass(Class containerClass); - // @property (assign, nonatomic) BOOL swiftAsyncStacktraces; - [Export("swiftAsyncStacktraces")] - bool SwiftAsyncStacktraces { get; set; } + // +(void)setRedactContainerClass:(Class _Nonnull)containerClass; + [Static] + [Export("setRedactContainerClass:")] + void SetRedactContainerClass(Class containerClass); - // @property (copy, nonatomic) NSString * _Nonnull cacheDirectoryPath; - [Export("cacheDirectoryPath")] - string CacheDirectoryPath { get; set; } + // +(void)setReplayTags:(NSDictionary * _Nonnull)tags; + [Static] + [Export("setReplayTags:")] + void SetReplayTags(NSDictionary tags); - // @property (assign, nonatomic) BOOL enableSpotlight; - [Export("enableSpotlight")] - bool EnableSpotlight { get; set; } + // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary; + [Static] + [Export("userWithDictionary:")] + SentryUser UserWithDictionary(NSDictionary dictionary); - // @property (copy, nonatomic) NSString * _Nonnull spotlightUrl; - [Export("spotlightUrl")] - string SpotlightUrl { get; set; } + // +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary; + [Static] + [Export("breadcrumbWithDictionary:")] + SentryBreadcrumb BreadcrumbWithDictionary(NSDictionary dictionary); - // @property (readonly, nonatomic) NSObject * _Nonnull _swiftExperimentalOptions; - [Export("_swiftExperimentalOptions")] - SentryExperimentalOptions Experimental { get; } + // +(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); } -// typedef void (^SentryProfilingConfigurationBlock)(SentryProfileOptions * _Nonnull); -[Internal] -delegate void SentryProfilingConfigurationBlock(SentryProfileOptions options); - -// @interface SentryReplayApi : NSObject +// @interface SentryOptions : NSObject [BaseType(typeof(NSObject))] [Internal] -interface SentryReplayApi +interface SentryOptions { - // -(void)maskView:(UIView * _Nonnull)view __attribute__((swift_name("maskView(_:)"))); - [Export("maskView:")] - void MaskView(UIView view); - - // -(void)unmaskView:(UIView * _Nonnull)view __attribute__((swift_name("unmaskView(_:)"))); - [Export("unmaskView:")] - void UnmaskView(UIView view); - - // -(void)pause; - [Export("pause")] - void Pause(); - - // -(void)resume; - [Export("resume")] - void Resume(); + // @property (copy, nonatomic) NSString * _Nullable dsn; + [NullAllowed, Export("dsn")] + string Dsn { get; set; } - // -(void)start; - [Export("start")] - void Start(); + // @property (nonatomic, strong) SentryDsn * _Nullable parsedDsn; + [NullAllowed, Export("parsedDsn", ArgumentSemantic.Strong)] + SentryDsn ParsedDsn { get; set; } - // -(void)stop; - [Export("stop")] - void Stop(); + // @property (nonatomic) BOOL debug; + [Export("debug")] + bool Debug { get; set; } - // -(void)showMaskPreview; - [Export("showMaskPreview")] - void ShowMaskPreview(); + // @property (nonatomic) SentryLevel diagnosticLevel; + [Export("diagnosticLevel", ArgumentSemantic.Assign)] + SentryLevel DiagnosticLevel { get; set; } - // -(void)showMaskPreview:(CGFloat)opacity; - [Export("showMaskPreview:")] - void ShowMaskPreview(nfloat opacity); + // @property (copy, nonatomic) NSString * _Nullable releaseName; + [NullAllowed, Export("releaseName")] + string ReleaseName { get; set; } - // -(void)hideMaskPreview; - [Export("hideMaskPreview")] - void HideMaskPreview(); -} + // @property (copy, nonatomic) NSString * _Nullable dist; + [NullAllowed, Export("dist")] + string Dist { get; set; } -// @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 * _Nonnull environment; + [Export("environment")] + string Environment { get; set; } - // @property (copy, nonatomic) NSString * _Nullable cookies; - [NullAllowed, Export("cookies")] - string Cookies { get; set; } + // @property (nonatomic) BOOL enabled; + [Export("enabled")] + bool Enabled { get; set; } - // @property (nonatomic, strong) NSDictionary * _Nullable headers; - [NullAllowed, Export("headers", ArgumentSemantic.Strong)] - NSDictionary Headers { get; set; } + // @property (nonatomic) NSTimeInterval shutdownTimeInterval; + [Export("shutdownTimeInterval")] + double ShutdownTimeInterval { get; set; } - // @property (copy, nonatomic) NSString * _Nullable fragment; - [NullAllowed, Export("fragment")] - string Fragment { get; set; } + // @property (nonatomic) BOOL enableCrashHandler; + [Export("enableCrashHandler")] + bool EnableCrashHandler { get; set; } - // @property (copy, nonatomic) NSString * _Nullable method; - [NullAllowed, Export("method")] - string Method { get; set; } + // @property (nonatomic) BOOL enableSigtermReporting; + [Export("enableSigtermReporting")] + bool EnableSigtermReporting { get; set; } - // @property (copy, nonatomic) NSString * _Nullable queryString; - [NullAllowed, Export("queryString")] - string QueryString { get; set; } + // @property (nonatomic) NSUInteger maxBreadcrumbs; + [Export("maxBreadcrumbs")] + nuint MaxBreadcrumbs { get; set; } - // @property (copy, nonatomic) NSString * _Nullable url; - [NullAllowed, Export("url")] - string Url { get; set; } -} + // @property (nonatomic) BOOL enableNetworkBreadcrumbs; + [Export("enableNetworkBreadcrumbs")] + bool EnableNetworkBreadcrumbs { 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 maxCacheItems; + [Export("maxCacheItems")] + nuint MaxCacheItems { get; set; } - // @property (readonly, nonatomic) NSDictionary * _Nullable customSamplingContext; - [NullAllowed, Export("customSamplingContext")] - NSDictionary CustomSamplingContext { get; } + // @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend; + [NullAllowed, Export("beforeSend", ArgumentSemantic.Copy)] + SentryBeforeSendEventCallback BeforeSend { get; set; } - // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext; - [Export("initWithTransactionContext:")] - NativeHandle Constructor(SentryTransactionContext transactionContext); + // @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan; + [NullAllowed, Export("beforeSendSpan", ArgumentSemantic.Copy)] + SentryBeforeSendSpanCallback BeforeSendSpan { get; set; } - // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; - [Export("initWithTransactionContext:customSamplingContext:")] - NativeHandle Constructor(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); -} + // @property (nonatomic) BOOL enableLogs; + [Export("enableLogs")] + bool EnableLogs { 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) SentryLog * _Nullable (^ _Nullable)(SentryLog * _Nonnull) beforeSendLog; + [NullAllowed, Export("beforeSendLog", ArgumentSemantic.Copy)] + Func BeforeSendLog { get; set; } - // @property (nonatomic, strong) NSString * _Nullable replayId; - [NullAllowed, Export("replayId", ArgumentSemantic.Strong)] - string ReplayId { get; set; } + // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb; + [NullAllowed, Export("beforeBreadcrumb", ArgumentSemantic.Copy)] + SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; } - // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull tags; - [Export("tags", ArgumentSemantic.Copy)] - NSDictionary Tags { get; } + // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureScreenshot; + [NullAllowed, Export("beforeCaptureScreenshot", ArgumentSemantic.Copy)] + SentryBeforeCaptureScreenshotCallback BeforeCaptureScreenshot { get; set; } - // -(instancetype _Nonnull)initWithMaxBreadcrumbs:(NSInteger)maxBreadcrumbs __attribute__((objc_designated_initializer)); - [Export("initWithMaxBreadcrumbs:")] - [DesignatedInitializer] - NativeHandle Constructor(nint maxBreadcrumbs); + // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureViewHierarchy; + [NullAllowed, Export("beforeCaptureViewHierarchy", ArgumentSemantic.Copy)] + SentryBeforeCaptureScreenshotCallback BeforeCaptureViewHierarchy { get; set; } - // -(instancetype _Nonnull)initWithScope:(SentryScope * _Nonnull)scope; - [Export("initWithScope:")] - NativeHandle Constructor(SentryScope scope); + // @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun; + [NullAllowed, Export("onCrashedLastRun", ArgumentSemantic.Copy)] + SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; } - // -(void)setUser:(SentryUser * _Nullable)user; - [Export("setUser:")] - void SetUser([NullAllowed] SentryUser user); + // @property (nonatomic, strong) NSNumber * _Nullable sampleRate; + [NullAllowed, Export("sampleRate", ArgumentSemantic.Strong)] + 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 (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 (nonatomic) BOOL enableGraphQLOperationTracking; + [Export("enableGraphQLOperationTracking")] + bool EnableGraphQLOperationTracking { get; set; } - // -(void)setTags:(NSDictionary * _Nullable)tags; - [Export("setTags:")] - void SetTags([NullAllowed] NSDictionary tags); + // @property (nonatomic) BOOL enableWatchdogTerminationTracking; + [Export("enableWatchdogTerminationTracking")] + bool EnableWatchdogTerminationTracking { get; set; } - // -(void)setExtras:(NSDictionary * _Nullable)extras; - [Export("setExtras:")] - void SetExtras([NullAllowed] NSDictionary extras); + // @property (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 (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 (nonatomic) NSUInteger maxAttachmentSize; + [Export("maxAttachmentSize")] + nuint MaxAttachmentSize { get; set; } - // -(void)setDist:(NSString * _Nullable)dist; - [Export("setDist:")] - void SetDist([NullAllowed] string dist); + // @property (nonatomic) BOOL sendDefaultPii; + [Export("sendDefaultPii")] + bool SendDefaultPii { get; set; } - // -(void)setEnvironment:(NSString * _Nullable)environment; - [Export("setEnvironment:")] - void SetEnvironment([NullAllowed] string environment); + // @property (nonatomic) BOOL enableAutoPerformanceTracing; + [Export("enableAutoPerformanceTracing")] + bool EnableAutoPerformanceTracing { get; set; } - // -(void)setFingerprint:(NSArray * _Nullable)fingerprint; - [Export("setFingerprint:")] - void SetFingerprint([NullAllowed] string[] fingerprint); + // @property (nonatomic) BOOL enablePersistingTracesWhenCrashing; + [Export("enablePersistingTracesWhenCrashing")] + bool EnablePersistingTracesWhenCrashing { get; set; } - // -(void)setLevel:(enum SentryLevel)level; - [Export("setLevel:")] - void SetLevel(SentryLevel level); + // @property (copy, nonatomic) SentryScope * _Nonnull (^ _Nonnull)(SentryScope * _Nonnull) initialScope; + [Export("initialScope", ArgumentSemantic.Copy)] + Func InitialScope { get; set; } - // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb __attribute__((swift_name("addBreadcrumb(_:)"))); - [Export("addBreadcrumb:")] - void AddBreadcrumb(SentryBreadcrumb crumb); + // @property (nonatomic) BOOL enableUIViewControllerTracing; + [Export("enableUIViewControllerTracing")] + bool EnableUIViewControllerTracing { get; set; } - // -(void)add:(SentryBreadcrumb * _Nonnull)crumb __attribute__((deprecated("use `addBreadcrumb` instead"))) __attribute__((swift_name("add(_:)"))); - [Export("add:")] - void Add(SentryBreadcrumb crumb); + // @property (nonatomic) BOOL attachScreenshot; + [Export("attachScreenshot")] + bool AttachScreenshot { get; set; } - // -(void)clearBreadcrumbs; - [Export("clearBreadcrumbs")] - void ClearBreadcrumbs(); + // @property (nonatomic, strong) SentryViewScreenshotOptions * _Nonnull screenshot; + [Export("screenshot", ArgumentSemantic.Strong)] + SentryViewScreenshotOptions Screenshot { get; set; } - // -(NSDictionary * _Nonnull)serialize; - [Export("serialize")] - NSDictionary Serialize(); + // @property (nonatomic) BOOL attachViewHierarchy; + [Export("attachViewHierarchy")] + bool AttachViewHierarchy { 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) BOOL reportAccessibilityIdentifier; + [Export("reportAccessibilityIdentifier")] + bool ReportAccessibilityIdentifier { get; set; } - // -(void)removeContextForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeContext(key:)"))); - [Export("removeContextForKey:")] - void RemoveContextForKey(string key); + // @property (nonatomic) BOOL enableUserInteractionTracing; + [Export("enableUserInteractionTracing")] + bool EnableUserInteractionTracing { get; set; } - // -(void)addAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((swift_name("addAttachment(_:)"))); - [Export("addAttachment:")] - void AddAttachment(SentryAttachment attachment); + // @property (nonatomic) NSTimeInterval idleTimeout; + [Export("idleTimeout")] + double IdleTimeout { 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 enablePreWarmedAppStartTracing; + [Export("enablePreWarmedAppStartTracing")] + bool EnablePreWarmedAppStartTracing { get; set; } - // -(void)clearAttachments; - [Export("clearAttachments")] - void ClearAttachments(); + // @property (nonatomic) BOOL enableReportNonFullyBlockingAppHangs; + [Export("enableReportNonFullyBlockingAppHangs")] + bool EnableReportNonFullyBlockingAppHangs { get; set; } - // -(void)clear; - [Export("clear")] - void Clear(); + // -(BOOL)isAppHangTrackingDisabled __attribute__((warn_unused_result(""))); + [Export("isAppHangTrackingDisabled")] + bool IsAppHangTrackingDisabled { get; } - // -(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, 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 (nonatomic) BOOL enableNetworkTracking; + [Export("enableNetworkTracking")] + bool EnableNetworkTracking { get; set; } - // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value; - [Export("initWithValue:")] - NativeHandle Constructor(string value); + // @property (nonatomic) BOOL enableFileIOTracing; + [Export("enableFileIOTracing")] + bool EnableFileIOTracing { get; set; } - // @property (readonly, copy) NSString * _Nonnull sentrySpanIdString; - [Export("sentrySpanIdString")] - string SentrySpanIdString { get; } + // @property (nonatomic) BOOL enableDataSwizzling; + [Export("enableDataSwizzling")] + bool EnableDataSwizzling { get; set; } - // @property (readonly, nonatomic, strong, class) SentrySpanId * _Nonnull empty; - [Static] - [Export("empty", ArgumentSemantic.Strong)] - SentrySpanId Empty { get; } -} + // @property (nonatomic) BOOL enableFileManagerSwizzling; + [Export("enableFileManagerSwizzling")] + bool EnableFileManagerSwizzling { 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, strong) NSNumber * _Nullable tracesSampleRate; + [NullAllowed, Export("tracesSampleRate", ArgumentSemantic.Strong)] + NSNumber TracesSampleRate { get; set; } - // @property (nonatomic, strong) NSDictionary * _Nonnull registers; - [Export("registers", ArgumentSemantic.Strong)] - NSDictionary Registers { get; set; } + // @property (copy, nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler; + [NullAllowed, Export("tracesSampler", ArgumentSemantic.Copy)] + SentryTracesSamplerCallback TracesSampler { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable snapshot; - [NullAllowed, Export("snapshot", ArgumentSemantic.Copy)] - NSNumber Snapshot { get; set; } + // @property (readonly, nonatomic) BOOL isTracingEnabled; + [Export("isTracingEnabled")] + bool IsTracingEnabled { get; } - // -(instancetype _Nonnull)initWithFrames:(NSArray * _Nonnull)frames registers:(NSDictionary * _Nonnull)registers; - [Export("initWithFrames:registers:")] - NativeHandle Constructor(SentryFrame[] frames, NSDictionary registers); + // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppIncludes; + [Export("inAppIncludes", ArgumentSemantic.Copy)] + string[] InAppIncludes { get; } - // -(void)fixDuplicateFrames; - [Export("fixDuplicateFrames")] - void FixDuplicateFrames(); -} + // -(void)addInAppInclude:(NSString * _Nonnull)inAppInclude; + [Export("addInAppInclude:")] + void AddInAppInclude(string inAppInclude); -// @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; } + [Wrap("WeakUrlSessionDelegate")] + [NullAllowed] + NSUrlSessionDelegate UrlSessionDelegate { get; set; } - // @property (copy, nonatomic) NSString * _Nullable name; - [NullAllowed, Export("name")] - string Name { get; set; } + // @property (nonatomic, weak) id _Nullable urlSessionDelegate; + [NullAllowed, Export("urlSessionDelegate", ArgumentSemantic.Weak)] + NSObject WeakUrlSessionDelegate { get; set; } - // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; - [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] - SentryStacktrace Stacktrace { get; set; } + // @property (nonatomic, strong) NSURLSession * _Nullable urlSession; + [NullAllowed, Export("urlSession", ArgumentSemantic.Strong)] + NSUrlSession UrlSession { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable crashed; - [NullAllowed, Export("crashed", ArgumentSemantic.Copy)] - NSNumber Crashed { get; set; } + // @property (nonatomic) BOOL enableSwizzling; + [Export("enableSwizzling")] + bool EnableSwizzling { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable current; - [NullAllowed, Export("current", ArgumentSemantic.Copy)] - NSNumber Current { get; set; } + // @property (copy, nonatomic) NSSet * _Nonnull swizzleClassNameExcludes; + [Export("swizzleClassNameExcludes", ArgumentSemantic.Copy)] + NSSet SwizzleClassNameExcludes { get; set; } - // @property (copy, nonatomic) NSNumber * _Nullable isMain; - [NullAllowed, Export("isMain", ArgumentSemantic.Copy)] - NSNumber IsMain { get; set; } + // @property (nonatomic) BOOL enableCoreDataTracing; + [Export("enableCoreDataTracing")] + bool EnableCoreDataTracing { get; set; } - // -(instancetype _Nonnull)initWithThreadId:(NSNumber * _Nonnull)threadId; - [Export("initWithThreadId:")] - NativeHandle Constructor(NSNumber threadId); -} + // @property (copy, nonatomic) void (^ _Nullable)(SentryProfileOptions * _Nonnull) configureProfiling; + [NullAllowed, Export("configureProfiling", ArgumentSemantic.Copy)] + Action ConfigureProfiling { get; set; } -// @interface SentryTraceContext : NSObject -[BaseType(typeof(NSObject))] -[Internal] -interface SentryTraceContext : SentrySerializable -{ - // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export("traceId")] - SentryId TraceId { get; } + // @property (nonatomic, strong) SentryProfileOptions * _Nullable profiling; + [NullAllowed, Export("profiling", ArgumentSemantic.Strong)] + SentryProfileOptions Profiling { get; set; } - // @property (readonly, nonatomic) NSString * _Nonnull publicKey; - [Export("publicKey")] - string PublicKey { get; } + // -(BOOL)isContinuousProfilingEnabled __attribute__((warn_unused_result(""))); + [Export("isContinuousProfilingEnabled")] + bool IsContinuousProfilingEnabled { get; } - // @property (readonly, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export("releaseName")] - string ReleaseName { get; } + // -(BOOL)isProfilingCorrelatedToTraces __attribute__((warn_unused_result(""))); + [Export("isProfilingCorrelatedToTraces")] + bool IsProfilingCorrelatedToTraces { get; } - // @property (readonly, nonatomic) NSString * _Nullable environment; - [NullAllowed, Export("environment")] - string Environment { get; } + // @property (nonatomic) BOOL sendClientReports; + [Export("sendClientReports")] + bool SendClientReports { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable transaction; - [NullAllowed, Export("transaction")] - string Transaction { get; } + // @property (nonatomic) BOOL enableAppHangTracking; + [Export("enableAppHangTracking")] + bool EnableAppHangTracking { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable userSegment; - [NullAllowed, Export("userSegment")] - string UserSegment { get; } + // @property (nonatomic) NSTimeInterval appHangTimeoutInterval; + [Export("appHangTimeoutInterval")] + double AppHangTimeoutInterval { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable sampleRate; - [NullAllowed, Export("sampleRate")] - string SampleRate { get; } + // @property (nonatomic) BOOL enableAutoBreadcrumbTracking; + [Export("enableAutoBreadcrumbTracking")] + bool EnableAutoBreadcrumbTracking { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable sampleRand; - [NullAllowed, Export("sampleRand")] - string SampleRand { get; } + // @property (nonatomic) BOOL enablePropagateTraceparent; + [Export("enablePropagateTraceparent")] + bool EnablePropagateTraceparent { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable sampled; - [NullAllowed, Export("sampled")] - string Sampled { get; } + // @property (copy, nonatomic) NSArray * _Nonnull tracePropagationTargets; + [Export("tracePropagationTargets", ArgumentSemantic.Copy)] + NSObject[] TracePropagationTargets { get; set; } - // @property (readonly, nonatomic) NSString * _Nullable replayId; - [NullAllowed, Export("replayId")] - string ReplayId { get; } + // @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 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 (copy, nonatomic) NSArray * _Nonnull failedRequestStatusCodes; + [Export("failedRequestStatusCodes", ArgumentSemantic.Copy)] + SentryHttpStatusCodeRange[] FailedRequestStatusCodes { 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 failedRequestTargets; + [Export("failedRequestTargets", ArgumentSemantic.Copy)] + NSObject[] FailedRequestTargets { get; set; } - // -(instancetype _Nullable)initWithScope:(SentryScope * _Nonnull)scope options:(SentryOptions * _Nonnull)options; - [Export("initWithScope:options:")] - NativeHandle Constructor(SentryScope scope, SentryOptions options); + // @property (nonatomic) BOOL enableMetricKit; + [Export("enableMetricKit")] + bool EnableMetricKit { get; set; } - // -(instancetype _Nullable)initWithDict:(NSDictionary * _Nonnull)dictionary; - [Export("initWithDict:")] - NativeHandle Constructor(NSDictionary dictionary); + // @property (nonatomic) BOOL enableMetricKitRawPayload; + [Export("enableMetricKitRawPayload")] + bool EnableMetricKitRawPayload { 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 enableTimeToFullDisplayTracing; + [Export("enableTimeToFullDisplayTracing")] + bool EnableTimeToFullDisplayTracing { 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 swiftAsyncStacktraces; + [Export("swiftAsyncStacktraces")] + bool SwiftAsyncStacktraces { get; set; } - // -(SentryBaggage * _Nonnull)toBaggage; - [Export("toBaggage")] - SentryBaggage ToBaggage(); -} + // @property (copy, nonatomic) NSString * _Nonnull cacheDirectoryPath; + [Export("cacheDirectoryPath")] + string CacheDirectoryPath { get; set; } -// @interface SentryTraceHeader : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryTraceHeader -{ - // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export("traceId")] - SentryId TraceId { get; } + // @property (nonatomic) BOOL enableSpotlight; + [Export("enableSpotlight")] + bool EnableSpotlight { get; set; } - // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; - [Export("spanId")] - SentrySpanId SpanId { get; } + // @property (copy, nonatomic) NSString * _Nonnull spotlightUrl; + [Export("spotlightUrl")] + string SpotlightUrl { get; set; } - // @property (readonly, nonatomic) SentrySampleDecision sampled; - [Export("sampled")] - SentrySampleDecision Sampled { get; } + // @property (nonatomic, strong) SentryExperimentalOptions * _Nonnull experimental; + [Export("experimental", ArgumentSemantic.Strong)] + SentryExperimentalOptions Experimental { 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); + // +(BOOL)isValidSampleRate:(NSNumber * _Nonnull)rate __attribute__((warn_unused_result(""))); + [Static] + [Export("isValidSampleRate:")] + bool IsValidSampleRate(NSNumber rate); - // -(NSString * _Nonnull)value; - [Export("value")] - string Value { get; } + // @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 +2119,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,9 +2127,9 @@ interface SentryExperimentalOptions [Export("enableSessionReplayInUnreliableEnvironment")] bool EnableSessionReplayInUnreliableEnvironment { get; set; } - // @property (nonatomic) BOOL enableLogs; - [Export("enableLogs")] - bool EnableLogs { get; set; } + // @property (nonatomic) BOOL enableMetrics; + [Export("enableMetrics")] + bool EnableMetrics { get; set; } // -(void)validateOptions:(NSDictionary * _Nullable)options; [Export("validateOptions:")] @@ -2166,39 +2146,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; } + [Export("showWidget")] + void ShowWidget(); + [Export("hideWidget")] + void HideWidget(); +} - // @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString; - [Export("sentryIdString")] - string SentryIdString { get; } +// @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([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; + [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); - // -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer)); - [Export("initWithUuid:")] - [DesignatedInitializer] - NativeHandle Constructor(NSUuid uuid); + // -(void)reportFullyDisplayed; + [Export("reportFullyDisplayed")] + void ReportFullyDisplayed(); - // -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer)); - [Export("initWithUUIDString:")] - [DesignatedInitializer] - NativeHandle Constructor(string uuidString); + // -(void)flush:(NSTimeInterval)timeout; + [Export("flush:")] + void Flush(double timeout); - // @property (readonly, nonatomic) NSUInteger hash; - [Export("hash")] - nuint Hash { get; } + // -(void)close; + [Export("close")] + void Close(); } // @interface SentryLog : NSObject @@ -2215,17 +2309,29 @@ 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); } // @interface SentryLogger : NSObject @@ -2234,6 +2340,7 @@ interface SentryLog [Internal] interface SentryLogger { + // -(void)trace:(NSString * _Nonnull)body; [Export("trace:")] void Trace(string body); @@ -2349,6 +2456,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 @@ -2397,6 +2514,22 @@ 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; } @@ -2571,6 +2704,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 +2785,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 @@ -2697,210 +2882,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 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:")] - 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 * _Nonnull)captureScreenshots; - [Static] - [Export("captureScreenshots")] - NSData[] CaptureScreenshots(); - - // +(NSData * _Nonnull)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; } + // @property (readonly, copy, nonatomic) NSSet * _Nonnull excludedViewClasses; + [Export("excludedViewClasses", ArgumentSemantic.Copy)] + NSSet ExcludedViewClasses { 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); + // @property (readonly, copy, nonatomic) NSSet * _Nonnull includedViewClasses; + [Export("includedViewClasses", ArgumentSemantic.Copy)] + NSSet IncludedViewClasses { get; } - // +(void)setReplayTags:(NSDictionary * _Nonnull)tags; - [Static] - [Export("setReplayTags:")] - void SetReplayTags(NSDictionary tags); + // -(void)excludeViewTypeFromSubtreeTraversal:(NSString * _Nonnull)viewType; + [Export("excludeViewTypeFromSubtreeTraversal:")] + void ExcludeViewTypeFromSubtreeTraversal(string viewType); - // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary; - [Static] - [Export("userWithDictionary:")] - SentryUser UserWithDictionary(NSDictionary dictionary); + // -(void)includeViewTypeInSubtreeTraversal:(NSString * _Nonnull)viewType; + [Export("includeViewTypeInSubtreeTraversal:")] + void IncludeViewTypeInSubtreeTraversal(string viewType); - // +(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 1077aa21f2..25d0a44a2e 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] @@ -67,6 +76,14 @@ internal enum SentrySpanStatus : ulong DataLoss } +[Native] +internal enum SentryAppStartType : ulong +{ + Warm, + Cold, + Unknown +} + [Native] internal enum SentryANRType : long { @@ -78,25 +95,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..bb5c6cf258 100644 --- a/src/Sentry/Platforms/Cocoa/SentryOptions.cs +++ b/src/Sentry/Platforms/Cocoa/SentryOptions.cs @@ -69,9 +69,10 @@ 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. + /// 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. @@ -83,6 +84,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; set; } = false; /// @@ -237,7 +239,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 +249,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..90adf733c9 100644 --- a/src/Sentry/Platforms/Cocoa/SentrySdk.cs +++ b/src/Sentry/Platforms/Cocoa/SentrySdk.cs @@ -115,8 +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; - nativeOptions.EnableAppHangTrackingV2 = options.Native.EnableAppHangTrackingV2; +#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; @@ -134,8 +135,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