diff --git a/scripts/generate-cocoa-bindings.ps1 b/scripts/generate-cocoa-bindings.ps1 index f91b32f4c7..38b5eae0a2 100644 --- a/scripts/generate-cocoa-bindings.ps1 +++ b/scripts/generate-cocoa-bindings.ps1 @@ -2,6 +2,7 @@ Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' +$PSNativeCommandUseErrorActionPreference = $true $RootPath = (Get-Item $PSScriptRoot).Parent.FullName $CocoaSdkPath = "$RootPath/modules/sentry-cocoa" @@ -103,8 +104,11 @@ if (!(Test-Path '/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/ } # Get iPhone SDK version -$iPhoneSdkVersion = sharpie xcode -sdks | grep -o -m 1 'iphoneos\S*' +$XcodePath = (xcode-select -p) -replace '/Contents/Developer$', '' +$iPhoneSdkVersion = sharpie xcode -xcode $XcodePath -sdks | grep -o -m 1 'iphoneos\S*' Write-Output "iPhoneSdkVersion: $iPhoneSdkVersion" +$iPhoneSdkPath = xcrun --show-sdk-path --sdk $iPhoneSdkVersion +Write-Output "iPhoneSdkPath: $iPhoneSdkPath" ## Imports in the various header files are provided in the "new" style of: # `#import ` @@ -141,15 +145,34 @@ else { Write-Host "File not found: $privateHeaderFile" } +$swiftHeaderFile = "$HeadersPath/Sentry-Swift.h" +if (Test-Path $swiftHeaderFile) +{ + $content = Get-Content -Path $swiftHeaderFile -Raw + # Replace module @imports with traditional #includes + $content = $content -replace '(?m)^#if\s+(__has_feature\(objc_modules\))', '#if 1 // $1' + $content = $content -replace '(?m)^@import\s+ObjectiveC;\s*\n', '' + $content = $content -replace '(?m)^@import\s+(\w+);', '#include <$1/$1.h>' + $content = $content -replace '(?m)^#import\s+"Sentry.h"\s*\n', '' + + Set-Content -Path $swiftHeaderFile -Value $content + Write-Host "Patched includes: $swiftHeaderFile" +} +else +{ + Write-Host "File not found: $swiftHeaderFile" +} # Generate bindings Write-Output 'Generating bindings with Objective Sharpie.' sharpie bind -sdk $iPhoneSdkVersion ` -scope "$CocoaSdkPath" ` "$HeadersPath/Sentry.h" ` + "$HeadersPath/Sentry-Swift.h" ` "$PrivateHeadersPath/PrivateSentrySDKOnly.h" ` -o $BindingsPath ` - -c -Wno-objc-property-no-attribute + -c -Wno-objc-property-no-attribute ` + -F"$iPhoneSdkPath/System/Library/SubFrameworks" # needed for UIUtilities.framework in Xcode 26+ # Ensure backup path exists if (!(Test-Path $BackupPath)) @@ -157,15 +180,7 @@ if (!(Test-Path $BackupPath)) New-Item -ItemType Directory -Path $BackupPath | Out-Null } -# The following header will be added to patched files. The notice applies -# to those files, not this script which generates the files. -$Header = @" -// ----------------------------------------------------------------------------- -// This file is auto-generated by Objective Sharpie and patched via the script -// at /scripts/generate-cocoa-bindings.ps1. Do not edit this file directly. -// If changes are required, update the script instead. -// ----------------------------------------------------------------------------- -"@ +Push-Location $PSScriptRoot ################################################################################ # Patch StructsAndEnums.cs @@ -173,26 +188,7 @@ $Header = @" $File = 'StructsAndEnums.cs' Write-Output "Patching $BindingsPath/$File" Copy-Item "$BindingsPath/$File" -Destination "$BackupPath/$File" -$Text = Get-Content "$BindingsPath/$File" -Raw - -# Tabs to spaces -$Text = $Text -replace '\t', ' ' - -# Trim extra newline at EOF -$Text = $Text -replace '\n$', '' - -# Insert namespace -$Text = $Text -replace 'using .+;\n\n', "$&namespace Sentry.CocoaSdk;`n`n" - -# Public to internal -$Text = $Text -replace '\bpublic\b', 'internal' - -# Remove static CFunctions class -$Text = $Text -replace '(?ms)\nstatic class CFunctions.*?}\n', '' - -# Add header and output file -$Text = "$Header`n`n$Text" -$Text | Out-File "$BindingsPath/$File" +& dotnet run "$PSScriptRoot/patch-cocoa-bindings.cs" "$BindingsPath/$File" | ForEach-Object { Write-Host $_ } ################################################################################ # Patch ApiDefinitions.cs @@ -200,114 +196,4 @@ $Text | Out-File "$BindingsPath/$File" $File = 'ApiDefinitions.cs' Write-Output "Patching $BindingsPath/$File" Copy-Item "$BindingsPath/$File" -Destination "$BackupPath/$File" -$Text = Get-Content "$BindingsPath/$File" -Raw - -# Tabs to spaces -$Text = $Text -replace '\t', ' ' - -# Trim extra newline at EOF -$Text = $Text -replace '\n$', '' - -# Insert namespace -$Text = $Text -replace 'using .+;\n\n', "$&namespace Sentry.CocoaSdk;`n`n" - -# Set Internal attributes on interfaces and delegates -$Text = $Text -replace '(?m)^(partial interface|interface|delegate)\b', "[Internal]`n$&" - -# Fix ISentrySerializable usage -$Text = $Text -replace '\bISentrySerializable\b', 'SentrySerializable' - -# Remove INSCopying due to https://github.com/xamarin/xamarin-macios/issues/17130 -$Text = $Text -replace ': INSCopying,', ':' -replace '\s?[:,] INSCopying', '' - -# Remove iOS attributes like [iOS (13, 0)] -$Text = $Text -replace '\[iOS \(13,\s?0\)\]\n?\s*', '' - -# Remove Unavailable attributes like [Unavailable (PlatformName.iOSAppExtension)] -$Text = $Text -replace '\[Unavailable \(PlatformName\.\w+\)\]\n?\s*', '' - -# Fix delegate argument names -$Text = $Text -replace '(NSError) arg\d', '$1 error' -$Text = $Text -replace '(NSHttpUrlResponse) arg\d', '$1 response' -$Text = $Text -replace '(SentryEvent) arg\d', '$1 @event' -$Text = $Text -replace '(SentrySamplingContext) arg\d', '$1 samplingContext' -$Text = $Text -replace '(SentryBreadcrumb) arg\d', '$1 breadcrumb' -$Text = $Text -replace '(SentrySpan) arg\d', '$1 span' -$Text = $Text -replace '(SentryAppStartMeasurement) arg\d', '$1 appStartMeasurement' -$Text = $Text -replace '(SentryLog) arg\d', '$1 log' - -# Adjust nullable return delegates (though broken until this is fixed: https://github.com/xamarin/xamarin-macios/issues/17109) -$Text = $Text -replace 'delegate \w+ Sentry(BeforeBreadcrumb|BeforeSendEvent|TracesSampler)Callback', "[return: NullAllowed]`n$&" - -# Adjust protocols (some are models) -$Text = $Text -replace '(?ms)(@protocol.+?)/\*.+?\*/', '$1' -$Text = $Text -replace '(?ms)@protocol (SentrySerializable|SentrySpan).+?\[Protocol\]', "`$&`n[Model]" - -# Adjust SentrySpan base type -$Text = $Text -replace 'interface SentrySpan\b', "[BaseType (typeof(NSObject))]`n`$&" - -# Fix string constants -$Text = $Text -replace '(?m)(.*\n){2}^\s{4}NSString k.+?\n\n?', '' -$Text = $Text -replace '(?m)(.*\n){4}^partial interface Constants\n{\n}\n', '' -$Text = $Text -replace '\[Verify \(ConstantsInterfaceAssociation\)\]\n', '' - -# Remove SentryVersionNumber -$Text = $Text -replace '.*SentryVersionNumber.*\n?', '' - -# Remove SentryVersionString -$Text = $Text -replace '.*SentryVersionString.*\n?', '' - -# Remove duplicate attributes -$s = 'partial interface Constants' -$t = $Text -split $s, 2 -$t[1] = $t[1] -replace "\[Static\]\n\[Internal\]\n$s", $s -$Text = $t -join $s - -# Remove empty Constants block -$Text = $Text -replace '\[Static\]\s*\[Internal\]\s*partial\s+interface\s+Constants\s\{[\s\n]*\}\n\n', '' - -# Update MethodToProperty translations -$Text = $Text -replace '(Export \("get\w+"\)\]\n)\s*\[Verify \(MethodToProperty\)\]\n(.+ \{ get; \})', '$1$2' -$Text = $Text -replace '\[Verify \(MethodToProperty\)\]\n\s*(.+ (?:Hash|Value|DefaultIntegrations|AppStartMeasurementWithSpans|BaggageHttpHeader) \{ get; \})', '$1' -$Text = $Text -replace '\[Verify \(MethodToProperty\)\]\n\s*(.+) \{ get; \}', '$1();' - -# Allow weakly typed NSArray -# We have some that accept either NSString or NSRegularExpression, which have no common type so they use NSObject -$Text = $Text -replace '\s*\[Verify \(StronglyTypedNSArray\)\]\n', '' - -# Fix broken multi-line comments -$Text = $Text -replace '(DEPRECATED_MSG_ATTRIBUTE\()\n\s*', '$1' -$Text = $Text -replace '(DEPRECATED_MSG_ATTRIBUTE\([^)]*?)"\s*\r?\n\s*"', '$1 ' - -# Remove default IsEqual implementation (already implemented by NSObject) -$Text = $Text -replace '(?ms)\n?^ *// [^\n]*isEqual:.*?$.*?;\n', '' - -# Replace obsolete platform availability attributes -$Text = $Text -replace '([\[,] )MacCatalyst \(', '$1Introduced (PlatformName.MacCatalyst, ' -$Text = $Text -replace '([\[,] )Mac \(', '$1Introduced (PlatformName.MacOSX, ' -$Text = $Text -replace '([\[,] )iOS \(', '$1Introduced (PlatformName.iOS, ' - -# Make interface partial if we need to access private APIs. Other parts will be defined in PrivateApiDefinitions.cs -$Text = $Text -replace '(?m)^interface SentryScope', 'partial $&' - -$Text = $Text -replace '.*SentryEnvelope .*?[\s\S]*?\n\n', '' -$Text = $Text -replace '.*typedef.*SentryOnAppStartMeasurementAvailable.*?[\s\S]*?\n\n', '' - -$propertiesToRemove = @( - 'SentryAppStartMeasurement', - 'SentryOnAppStartMeasurementAvailable', - 'SentryMetricsAPI', - 'SentryExperimentalOptions', - 'description', - 'enableMetricKitRawPayload' -) - -foreach ($property in $propertiesToRemove) -{ - $Text = $Text -replace "\n.*property.*$property.*?[\s\S]*?\}\n", '' -} - - -# Add header and output file -$Text = "$Header`n`n$Text" -$Text | Out-File "$BindingsPath/$File" +& dotnet run "$PSScriptRoot/patch-cocoa-bindings.cs" "$BindingsPath/$File" | ForEach-Object { Write-Host $_ } diff --git a/scripts/patch-cocoa-bindings.cs b/scripts/patch-cocoa-bindings.cs new file mode 100644 index 0000000000..70b544901c --- /dev/null +++ b/scripts/patch-cocoa-bindings.cs @@ -0,0 +1,515 @@ +#:package Microsoft.CodeAnalysis.CSharp@4.10.0 +#:package Microsoft.CodeAnalysis.CSharp.Workspaces@4.10.0 + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using CodeFormatter = Microsoft.CodeAnalysis.Formatting.Formatter; + +if (args.Length != 1) +{ + Console.Error.WriteLine("Usage: patch-cocoa-bindings.cs "); + return; +} + +const string Header = @"// ----------------------------------------------------------------------------- +// This file is auto-generated by Objective Sharpie and patched via the script +// at /scripts/patch-cocoa-bindings.cs. Do not edit this file directly. +// If changes are required, update the script instead. +// ----------------------------------------------------------------------------- + +"; +var code = Header + File.ReadAllText(args[0]); + +// Fix broken multi-line comments +code = Regex.Replace(code, @"(DEPRECATED_MSG_ATTRIBUTE\()\n\s*", "$1"); +code = Regex.Replace(code, @"(DEPRECATED_MSG_ATTRIBUTE\([^)]*?)""\s*\r?\n\s*""", "$1 "); + +var tree = CSharpSyntaxTree.ParseText(code); +var nodes = tree.GetCompilationUnitRoot() + .WithNamespace("Sentry.CocoaSdk") + .RemoveClass("CFunctions") + // Make enums, interfaces, and delegates internal + .AsInternal("Sentry*", "internal") + .WithAttribute("*Sentry*", "Internal") + // Adjust protocols (some are models) + .VerifyModel("SentryRedactOptions") + .VerifyModel("SentrySerializable") + .VerifyModel("SentrySpan") + .RemoveComment("SentryRRWebEvent", "[Model]") + .RemoveComment("SentryReplayBreadcrumbConverter", "[Model]") + .RemoveComment("SentryViewScreenshotProvider", "[Model]") + // Adjust base types + .WithAttribute("SentrySpan", "BaseType (typeof(NSObject))") + .WithAttribute("SentryRedactOptions", "BaseType (typeof(NSObject))") + // Remove INSCopying due to https://github.com/xamarin/xamarin-macios/issues/17130 + .RemoveBaseType("INSCopying") + // Fix property-to-method conversions + .PropertyToMethod("Sentry*", "Serialize") + .PropertyToMethod("SentrySpan", "ToTraceHeader") + .PropertyToMethod("SentryTraceContext", "ToBaggage") + .PropertyToMethod("PrivateSentrySDKOnly", "Capture*") + // Verify the rest + .VerifyProperty("*Sentry*", "*", "MethodToProperty") // TODO: replace broad patterns with one-by-one verification + .VerifyProperty("SentryOptions", "*Targets", "StronglyTypedNSArray") + // Fix delegate argument names + .RenameParameter("NSError", "arg*", "error") + .RenameParameter("NSHttpUrlResponse", "arg*", "response") + .RenameParameter("SentryEvent", "arg*", "@event") + .RenameParameter("SentrySamplingContext", "arg*", "samplingContext") + .RenameParameter("SentryBreadcrumb", "arg*", "breadcrumb") + .RenameParameter("SentrySpan", "arg*", "span") + .RenameParameter("SentryLog", "arg*", "log") + .RenameParameter("SentryProfileOptions", "arg*", "options") + // Fix interface names + .RenameInterface("ISentrySerializable", "SentrySerializable") + .RenameInterface("ISentryRedactOptions", "SentryRedactOptions") + .RenameBaseType("ISentrySerializable", "SentrySerializable") + .RenameBaseType("ISentryRedactOptions", "SentryRedactOptions") + // Rename conflicting SentryRRWebEvent (protocol vs. interface) + .RenameProtocol("SentryRRWebEvent", "ISentryRRWebEvent") + // Adjust nullable return delegates (though broken until this is fixed: https://github.com/xamarin/xamarin-macios/issues/17109) + .WithAttribute("SentryBeforeBreadcrumbCallback", "return: NullAllowed") + .WithAttribute("SentryBeforeSendEventCallback", "return: NullAllowed") + .WithAttribute("SentryTracesSamplerCallback", "return: NullAllowed") + // For PrivateApiDefinitions.cs + .WithModifier("SentryScope", "partial") + // error CS0246: The type or namespace name 'iOS' could not be found + .RemoveAttribute("iOS") + // error CS0246: The type or namespace name 'Mac' could not be found + .RemoveAttribute("Mac") + // error CS0117: 'PlatformName' does not contain a definition for 'iOSAppExtension' + .RemoveAttribute("Unavailable") + // error CS0114: 'SentryXxx.IsEqual(NSObject?)' hides inherited member 'NSObject.IsEqual(NSObject?)'. + .RemoveMethod("Sentry*", "IsEqual") + // error CS0246: The type or namespace name '_NSZone' could not be found + .RemoveMethod("Sentry*", "CopyWithZone") + // SentryEnvelope* is not whitelisted + .RemoveMethod("PrivateSentrySDKOnly", "CaptureEnvelope") + .RemoveMethod("PrivateSentrySDKOnly", "EnvelopeWithData") + .RemoveMethod("PrivateSentrySDKOnly", "StoreEnvelope") + // deprecated + .RemoveMethod("Sentry*", "CaptureUserFeedback") + // SentryAppStartMeasurement is not whitelisted + .RemoveDelegate("SentryOnAppStartMeasurementAvailable") + // deprecated + .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 + .RemoveProperty("SentryOptions", "ConfigureUserFeedback") + .KeepInterfaces( + "ISentryRRWebEvent", + "PrivateSentrySDKOnly", + "SentryAttachment", + "SentryBaggage", + "SentryBreadcrumb", + "SentryClient", + "SentryDebugImageProvider", + "SentryDebugMeta", + "SentryDsn", + "SentryEvent", + "SentryException", + "SentryFeedback", + "SentryFeedbackAPI", + "SentryFrame", + "SentryGeo", + "SentryHttpStatusCodeRange", + "SentryHub", + "SentryId", + "SentryLog", + "SentryLogger", + "SentryMeasurementUnit", + "SentryMeasurementUnitDuration", + "SentryMeasurementUnitFraction", + "SentryMeasurementUnitInformation", + "SentryMechanism", + "SentryMechanismMeta", + "SentryMessage", + "SentryNSError", + "SentryOptions", + "SentryProfileOptions", + "SentryRedactOptions", + "SentryReplayApi", + "SentryReplayBreadcrumbConverter", + "SentryReplayOptions", + "SentryRequest", + "SentryRRWebEvent", + "SentrySamplingContext", + "SentryScope", + "SentryScreenFrames", + "SentrySDK", + "SentrySerializable", + "SentrySpan", + "SentrySpanContext", + "SentrySpanId", + "SentryStacktrace", + "SentryThread", + "SentryTraceContext", + "SentryTraceHeader", + "SentryTransactionContext", + "SentryUser", + "SentryViewScreenshotOptions", + "SentryViewScreenshotProvider" + ); + +var formatted = CodeFormatter.Format(nodes, new AdhocWorkspace()); +File.WriteAllText(args[0], formatted.ToFullString() + "\n"); + +internal static class FilterExtensions +{ + public static CompilationUnitSyntax KeepInterfaces( + this CompilationUnitSyntax root, + params string[] names) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => !names.Any(name => node.Identifier.Matches(name))); + return root.RemoveNodes(nodes, SyntaxRemoveOptions.KeepNoTrivia)!; + } + + public static CompilationUnitSyntax WithNamespace( + this CompilationUnitSyntax root, + string name) + { + var node = SyntaxFactory.FileScopedNamespaceDeclaration(SyntaxFactory.ParseName(name)); + return SyntaxFactory.CompilationUnit() + .WithUsings(root.Usings) + .AddMembers(node.WithMembers(root.Members)); + } + + private static CompilationUnitSyntax RemoveByPredicate( + this CompilationUnitSyntax root, + Func predicate) where T : SyntaxNode + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => predicate(node)); + return root.RemoveNodes(nodes, SyntaxRemoveOptions.KeepNoTrivia)!; + } + + public static CompilationUnitSyntax RemoveClass( + this CompilationUnitSyntax root, + string name) + { + return root.RemoveByPredicate(node => node.Identifier.Matches(name)); + } + + public static CompilationUnitSyntax RemoveDelegate( + this CompilationUnitSyntax root, + string name) + { + return root.RemoveByPredicate(node => node.Identifier.Matches(name)); + } + + public static CompilationUnitSyntax RemoveAttribute( + this CompilationUnitSyntax root, + string name) + { + return root + .RemoveByPredicate(node => node.Name.Matches(name)) + .RemoveByPredicate(node => node.Attributes.Count == 0); + } + + public static CompilationUnitSyntax RemoveBaseType( + this CompilationUnitSyntax root, + string name) + { + return root + .RemoveByPredicate(node => node.Type.Matches(name)) + .RemoveByPredicate(node => node.Types.Count == 0); + } + + public static CompilationUnitSyntax RemoveMethod( + this CompilationUnitSyntax root, + string type, + string name) + { + return root.RemoveByPredicate(node => node.Identifier.Matches(name) && node.HasParent(type)); + } + + public static CompilationUnitSyntax KeepMethods( + this CompilationUnitSyntax root, + string type, + params string[] names) + { + return root.RemoveByPredicate(node => !names.Any(name => node.Identifier.Matches(name)) && node.HasParent(type)); + } + + public static CompilationUnitSyntax RemoveProperty( + this CompilationUnitSyntax root, + string type, + string name) + { + return root.RemoveByPredicate(node => node.Identifier.Matches(name) && node.HasParent(type)); + } + + public static CompilationUnitSyntax KeepProperties( + this CompilationUnitSyntax root, + string type, + params string[] names) + { + return root.RemoveByPredicate(node => !names.Any(name => node.Identifier.Matches(name)) && node.HasParent(type)); + } + + public static CompilationUnitSyntax WithAttribute( + this CompilationUnitSyntax root, + string type, + string attribute) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(type) && !node.HasAttribute(attribute)) + .Cast() + .Concat(root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(type) && !node.HasAttribute(attribute))); + return root.ReplaceNodes(nodes, (node, _) => node.WithAttribute(attribute)); + } + + public static CompilationUnitSyntax AsInternal( + this CompilationUnitSyntax root, + string name, + string modifier) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(name)); + return root.ReplaceNodes(nodes, (node, _) => node.WithModifier(modifier)); + } + + public static CompilationUnitSyntax WithModifier( + this CompilationUnitSyntax root, + string name, + string modifier) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(name)); + return root.ReplaceNodes(nodes, (node, _) => node.WithModifier(modifier)); + } + + public static CompilationUnitSyntax VerifyModel( + this CompilationUnitSyntax root, + string name) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(name) && node.HasAttribute("Protocol")); + return root.ReplaceNodes(nodes, (node, _) => node.WithAttribute("Model").RemoveComment("[Model]")); + } + + public static CompilationUnitSyntax RemoveComment( + this CompilationUnitSyntax root, + string name, + string comment) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(name) && node.HasComment(comment)); + return root.ReplaceNodes(nodes, (node, _) => node.RemoveComment(comment)); + } + + public static CompilationUnitSyntax RenameBaseType( + this CompilationUnitSyntax root, + string from, + string to) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Type.Matches(from)); + return root.ReplaceNodes(nodes, (node, _) => node.WithType(SyntaxFactory.ParseTypeName(to))); + } + + public static CompilationUnitSyntax RenameInterface( + this CompilationUnitSyntax root, + string from, + string to) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(from)); + return root.ReplaceNodes(nodes, (node, _) => node.WithIdentifier(SyntaxFactory.Identifier(to))); + } + + public static CompilationUnitSyntax RenameProtocol( + this CompilationUnitSyntax root, + string from, + string to) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(from) && node.HasAttribute("Protocol")); + return root.ReplaceNodes(nodes, (node, _) => node.WithIdentifier(SyntaxFactory.Identifier(to))); + } + + public static CompilationUnitSyntax RenameParameter( + this CompilationUnitSyntax root, + string type, + string from, + string to) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(from) && node.Type?.Matches(type) == true); + return root.ReplaceNodes(nodes, (node, _) => node.WithIdentifier(SyntaxFactory.Identifier(to))); + } + + public static CompilationUnitSyntax PropertyToMethod( + this CompilationUnitSyntax root, + string type, + string name) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(name) && node.HasParent(type) && node.HasAttribute("Verify", "MethodToProperty")); + return root.ReplaceNodes(nodes, (node, _) => + { + var attributes = node.AttributeLists.RemoveAttribute("Verify", "MethodToProperty"); + return SyntaxFactory.MethodDeclaration(node.Type, SyntaxFactory.Identifier(node.Identifier.Text)) + .WithModifiers(node.Modifiers) + .WithAttributeLists(attributes) + .WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)); + }); + } + + public static CompilationUnitSyntax VerifyProperty( + this CompilationUnitSyntax root, + string type, + string property, + string verify) + { + var nodes = root.DescendantNodes() + .OfType() + .Where(node => node.Identifier.Matches(property) && node.HasParent(type)); + return root.ReplaceNodes(nodes, (node, _) => node.WithAttributeLists(node.AttributeLists.RemoveAttribute("Verify", verify))); + } +} + +internal static class SyntaxNodeExtensions +{ + public static bool HasParent(this SyntaxNode node, string name) + { + return node.Parent is TypeDeclarationSyntax parent && parent.Identifier.Matches(name); + } + + public static bool HasAttribute(this SyntaxNode node, string attribute, string? arguments = null) + { + return node.GetAttributes() + .SelectMany(al => al.Attributes) + .Any(attr => attr.Name.Matches(attribute) && (arguments == null || attr.ArgumentList?.Arguments.ToString().Contains(arguments) == true)); + } + + public static SyntaxList GetAttributes(this SyntaxNode node) + { + return node switch + { + BaseTypeDeclarationSyntax type => type.AttributeLists, + DelegateDeclarationSyntax del => del.AttributeLists, + MethodDeclarationSyntax method => method.AttributeLists, + PropertyDeclarationSyntax property => property.AttributeLists, + _ => throw new NotSupportedException(node.GetType().Name) + }; + } + + public static SyntaxNode WithAttribute(this SyntaxNode node, string attribute) + { + var attributes = SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(SyntaxFactory.Attribute(SyntaxFactory.IdentifierName(attribute)))); + var existingAttributes = node.GetAttributes(); + var add = new Func((n, attr) => n switch + { + BaseTypeDeclarationSyntax type => type.AddAttributeLists(attr), + DelegateDeclarationSyntax del => del.AddAttributeLists(attr), + MethodDeclarationSyntax method => method.AddAttributeLists(attr), + PropertyDeclarationSyntax property => property.AddAttributeLists(attr), + _ => throw new NotSupportedException(n.GetType().Name) + }); + + if (existingAttributes.Count > 0) + { + return add(node, attributes); + } + + return add(node.WithLeadingTrivia(SyntaxFactory.TriviaList()), attributes.WithLeadingTrivia(node.GetLeadingTrivia())); + } + + public static SyntaxNode WithModifier(this SyntaxNode node, string modifier) + { + var modifiers = SyntaxFactory.TokenList(SyntaxFactory.ParseToken(modifier)); + return node switch + { + InterfaceDeclarationSyntax iface => iface.WithModifiers(modifiers), + EnumDeclarationSyntax enm => enm.WithModifiers(modifiers), + _ => throw new NotSupportedException(node.GetType().Name) + }; + } + + public static bool HasComment(this SyntaxNode node, string comment) + { + var trivia = node.GetLeadingTrivia(); + return trivia.Any(t => + t.IsKind(SyntaxKind.MultiLineCommentTrivia) && + t.ToString().Contains(comment)); + } + + public static SyntaxNode RemoveComment(this SyntaxNode node, string comment) + { + var trivia = SyntaxFactory.TriviaList( + node.GetLeadingTrivia().Where(t => + !(t.IsKind(SyntaxKind.MultiLineCommentTrivia) && t.ToString().Contains(comment)))); + return node.WithLeadingTrivia(trivia); + } +} + +internal static class AttributeListExtensions +{ + public static SyntaxList RemoveAttribute(this SyntaxList lists, string attribute, string? arguments = null) + { + var attributes = lists + .Select(al => al.WithAttributes( + SyntaxFactory.SeparatedList(al.Attributes.Where(attr => !(attr.Name.ToString() == attribute && (arguments == null || attr.ArgumentList?.Arguments.ToString().Contains(arguments) == true)))) + )) + .Where(al => al.Attributes.Count > 0); + return SyntaxFactory.List(attributes); + } +} + +internal static class WildcardExtensions +{ + public static bool Matches(this NameSyntax syntax, string pattern) + { + return syntax.ToString().Matches(pattern); + } + + public static bool Matches(this TypeSyntax syntax, string pattern) + { + return syntax.ToString().Matches(pattern); + } + + public static bool Matches(this SyntaxToken token, string pattern) + { + return token.Text.Matches(pattern); + } + + public static bool Matches(this string str, string pattern) + { + var negate = pattern.StartsWith('!'); + var actual = pattern.TrimStart('!'); + if (actual == str) + { + return !negate; + } + + if (!actual.Contains('*') && !actual.Contains('?')) + { + return negate; + } + + var regex = Regex.Escape(actual).Replace("\\*", ".*").Replace("\\?", "."); + return Regex.IsMatch(str, $"^{regex}$") != negate; + } +} diff --git a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs index 2c076ddf1a..132b2e5a15 100644 --- a/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs +++ b/src/Sentry.Bindings.Cocoa/ApiDefinitions.cs @@ -1,11 +1,13 @@ // ----------------------------------------------------------------------------- // This file is auto-generated by Objective Sharpie and patched via the script -// at /scripts/generate-cocoa-bindings.ps1. Do not edit this file directly. +// at /scripts/patch-cocoa-bindings.cs. Do not edit this file directly. // If changes are required, update the script instead. // ----------------------------------------------------------------------------- using System; +using CoreFoundation; using Foundation; +using MetricKit; using ObjCRuntime; using Sentry; using UIKit; @@ -14,2398 +16,2861 @@ namespace Sentry.CocoaSdk; // typedef void (^SentryRequestFinished)(NSError * _Nullable); [Internal] -delegate void SentryRequestFinished ([NullAllowed] NSError error); +delegate void SentryRequestFinished([NullAllowed] NSError error); // typedef void (^SentryRequestOperationFinished)(NSHTTPURLResponse * _Nullable, NSError * _Nullable); [Internal] -delegate void SentryRequestOperationFinished ([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error); +delegate void SentryRequestOperationFinished([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error); // typedef SentryBreadcrumb * _Nullable (^SentryBeforeBreadcrumbCallback)(SentryBreadcrumb * _Nonnull); [Internal] [return: NullAllowed] -delegate SentryBreadcrumb SentryBeforeBreadcrumbCallback (SentryBreadcrumb breadcrumb); +delegate SentryBreadcrumb SentryBeforeBreadcrumbCallback(SentryBreadcrumb breadcrumb); // typedef SentryEvent * _Nullable (^SentryBeforeSendEventCallback)(SentryEvent * _Nonnull); [Internal] [return: NullAllowed] -delegate SentryEvent SentryBeforeSendEventCallback (SentryEvent @event); +delegate SentryEvent SentryBeforeSendEventCallback(SentryEvent @event); // typedef id _Nullable (^SentryBeforeSendSpanCallback)(id _Nonnull); [Internal] -delegate SentrySpan SentryBeforeSendSpanCallback (SentrySpan span); +delegate SentrySpan SentryBeforeSendSpanCallback(SentrySpan span); // typedef SentryLog * _Nullable (^SentryBeforeSendLogCallback)(SentryLog * _Nonnull); [Internal] -delegate SentryLog SentryBeforeSendLogCallback (SentryLog log); +delegate SentryLog SentryBeforeSendLogCallback(SentryLog log); // typedef BOOL (^SentryBeforeCaptureScreenshotCallback)(SentryEvent * _Nonnull); [Internal] -delegate bool SentryBeforeCaptureScreenshotCallback (SentryEvent @event); +delegate bool SentryBeforeCaptureScreenshotCallback(SentryEvent @event); // typedef BOOL (^SentryBeforeCaptureViewHierarchyCallback)(SentryEvent * _Nonnull); [Internal] -delegate bool SentryBeforeCaptureViewHierarchyCallback (SentryEvent @event); +delegate bool SentryBeforeCaptureViewHierarchyCallback(SentryEvent @event); // typedef void (^SentryOnCrashedLastRunCallback)(SentryEvent * _Nonnull); [Internal] -delegate void SentryOnCrashedLastRunCallback (SentryEvent @event); +delegate void SentryOnCrashedLastRunCallback(SentryEvent @event); // typedef BOOL (^SentryShouldQueueEvent)(NSHTTPURLResponse * _Nullable, NSError * _Nullable); [Internal] -delegate bool SentryShouldQueueEvent ([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error); +delegate bool SentryShouldQueueEvent([NullAllowed] NSHttpUrlResponse response, [NullAllowed] NSError error); // typedef NSNumber * _Nullable (^SentryTracesSamplerCallback)(SentrySamplingContext * _Nonnull); [Internal] [return: NullAllowed] -delegate NSNumber SentryTracesSamplerCallback (SentrySamplingContext samplingContext); +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); - -// typedef void (^SentryUserFeedbackConfigurationBlock)(SentryUserFeedbackConfiguration * _Nonnull); -[Internal] -delegate void SentryUserFeedbackConfigurationBlock (SentryUserFeedbackConfiguration arg0); +delegate void SentrySpanCallback(SentrySpan span); // @interface SentryAttachment : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryAttachment { // -(instancetype _Nonnull)initWithData:(NSData * _Nonnull)data filename:(NSString * _Nonnull)filename; - [Export ("initWithData:filename:")] - NativeHandle Constructor (NSData data, string filename); + [Export("initWithData:filename:")] + NativeHandle Constructor(NSData data, string filename); // -(instancetype _Nonnull)initWithData:(NSData * _Nonnull)data filename:(NSString * _Nonnull)filename contentType:(NSString * _Nullable)contentType; - [Export ("initWithData:filename:contentType:")] - NativeHandle Constructor (NSData data, string filename, [NullAllowed] string contentType); + [Export("initWithData:filename:contentType:")] + NativeHandle Constructor(NSData data, string filename, [NullAllowed] string contentType); // -(instancetype _Nonnull)initWithPath:(NSString * _Nonnull)path; - [Export ("initWithPath:")] - NativeHandle Constructor (string path); + [Export("initWithPath:")] + NativeHandle Constructor(string path); // -(instancetype _Nonnull)initWithPath:(NSString * _Nonnull)path filename:(NSString * _Nonnull)filename; - [Export ("initWithPath:filename:")] - NativeHandle Constructor (string path, string filename); + [Export("initWithPath:filename:")] + NativeHandle Constructor(string path, string filename); // -(instancetype _Nonnull)initWithPath:(NSString * _Nonnull)path filename:(NSString * _Nonnull)filename contentType:(NSString * _Nullable)contentType; - [Export ("initWithPath:filename:contentType:")] - NativeHandle Constructor (string path, string filename, [NullAllowed] string contentType); + [Export("initWithPath:filename:contentType:")] + NativeHandle Constructor(string path, string filename, [NullAllowed] string contentType); // @property (readonly, nonatomic, strong) NSData * _Nullable data; - [NullAllowed, Export ("data", ArgumentSemantic.Strong)] + [NullAllowed, Export("data", ArgumentSemantic.Strong)] NSData Data { get; } // @property (readonly, copy, nonatomic) NSString * _Nullable path; - [NullAllowed, Export ("path")] + [NullAllowed, Export("path")] string Path { get; } // @property (readonly, copy, nonatomic) NSString * _Nonnull filename; - [Export ("filename")] + [Export("filename")] string Filename { get; } // @property (readonly, copy, nonatomic) NSString * _Nullable contentType; - [NullAllowed, Export ("contentType")] + [NullAllowed, Export("contentType")] string ContentType { get; } } // @interface SentryBaggage : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryBaggage { // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export ("traceId")] + [Export("traceId")] SentryId TraceId { get; } // @property (readonly, nonatomic) NSString * _Nonnull publicKey; - [Export ("publicKey")] + [Export("publicKey")] string PublicKey { get; } // @property (readonly, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export ("releaseName")] + [NullAllowed, Export("releaseName")] string ReleaseName { get; } // @property (readonly, nonatomic) NSString * _Nullable environment; - [NullAllowed, Export ("environment")] + [NullAllowed, Export("environment")] string Environment { get; } // @property (readonly, nonatomic) NSString * _Nullable transaction; - [NullAllowed, Export ("transaction")] + [NullAllowed, Export("transaction")] string Transaction { get; } // @property (readonly, nonatomic) NSString * _Nullable userId; - [NullAllowed, Export ("userId")] + [NullAllowed, Export("userId")] string UserId { get; } // @property (readonly, nonatomic) NSString * _Nullable userSegment; - [NullAllowed, Export ("userSegment")] + [NullAllowed, Export("userSegment")] string UserSegment { get; } // @property (readonly, nonatomic) NSString * _Nullable sampleRand; - [NullAllowed, Export ("sampleRand")] + [NullAllowed, Export("sampleRand")] string SampleRand { get; } // @property (readonly, nonatomic) NSString * _Nullable sampleRate; - [NullAllowed, Export ("sampleRate")] + [NullAllowed, Export("sampleRate")] string SampleRate { get; } // @property (nonatomic, strong) NSString * _Nullable sampled; - [NullAllowed, Export ("sampled", ArgumentSemantic.Strong)] + [NullAllowed, Export("sampled", ArgumentSemantic.Strong)] string Sampled { get; set; } // @property (nonatomic, strong) NSString * _Nullable replayId; - [NullAllowed, Export ("replayId", ArgumentSemantic.Strong)] + [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); + [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 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); + [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); // -(NSString * _Nonnull)toHTTPHeaderWithOriginalBaggage:(NSDictionary * _Nullable)originalBaggage; - [Export ("toHTTPHeaderWithOriginalBaggage:")] - string ToHTTPHeaderWithOriginalBaggage ([NullAllowed] NSDictionary originalBaggage); + [Export("toHTTPHeaderWithOriginalBaggage:")] + string ToHTTPHeaderWithOriginalBaggage([NullAllowed] NSDictionary originalBaggage); } // @protocol SentrySerializable [Protocol] -[Model] -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] +[Model] interface SentrySerializable { // @required -(NSDictionary * _Nonnull)serialize; [Abstract] - [Export ("serialize")] + [Export("serialize")] NSDictionary Serialize(); } // @interface SentryBreadcrumb : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryBreadcrumb : SentrySerializable { // @property (nonatomic) SentryLevel level; - [Export ("level", ArgumentSemantic.Assign)] + [Export("level", ArgumentSemantic.Assign)] SentryLevel Level { get; set; } // @property (copy, nonatomic) NSString * _Nonnull category; - [Export ("category")] + [Export("category")] string Category { get; set; } // @property (nonatomic, strong) NSDate * _Nullable timestamp; - [NullAllowed, Export ("timestamp", ArgumentSemantic.Strong)] + [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] NSDate Timestamp { get; set; } // @property (copy, nonatomic) NSString * _Nullable type; - [NullAllowed, Export ("type")] + [NullAllowed, Export("type")] string Type { get; set; } // @property (copy, nonatomic) NSString * _Nullable message; - [NullAllowed, Export ("message")] + [NullAllowed, Export("message")] string Message { get; set; } // @property (copy, nonatomic) NSString * _Nullable origin; - [NullAllowed, Export ("origin")] + [NullAllowed, Export("origin")] string Origin { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable data; - [NullAllowed, Export ("data", ArgumentSemantic.Strong)] + [NullAllowed, Export("data", ArgumentSemantic.Strong)] NSDictionary Data { get; set; } // -(instancetype _Nonnull)initWithLevel:(SentryLevel)level category:(NSString * _Nonnull)category; - [Export ("initWithLevel:category:")] - NativeHandle Constructor (SentryLevel level, string category); + [Export("initWithLevel:category:")] + NativeHandle Constructor(SentryLevel level, string category); // -(NSDictionary * _Nonnull)serialize; - [Export ("serialize")] + [Export("serialize")] NSDictionary Serialize(); // -(BOOL)isEqualToBreadcrumb:(SentryBreadcrumb * _Nonnull)breadcrumb; - [Export ("isEqualToBreadcrumb:")] - bool IsEqualToBreadcrumb (SentryBreadcrumb breadcrumb); + [Export("isEqualToBreadcrumb:")] + bool IsEqualToBreadcrumb(SentryBreadcrumb breadcrumb); // -(NSUInteger)hash; - [Export ("hash")] + [Export("hash")] nuint Hash { get; } } // @interface SentryClient : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryClient { // @property (readonly, assign, nonatomic) BOOL isEnabled; - [Export ("isEnabled")] + [Export("isEnabled")] bool IsEnabled { get; } // @property (nonatomic, strong) SentryOptions * _Nonnull options; - [Export ("options", ArgumentSemantic.Strong)] + [Export("options", ArgumentSemantic.Strong)] SentryOptions Options { get; set; } // -(instancetype _Nullable)initWithOptions:(SentryOptions * _Nonnull)options; - [Export ("initWithOptions:")] - NativeHandle Constructor (SentryOptions options); + [Export("initWithOptions:")] + NativeHandle Constructor(SentryOptions options); // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event __attribute__((swift_name("capture(event:)"))); - [Export ("captureEvent:")] - SentryId CaptureEvent (SentryEvent @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); + [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); + [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); + [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); + [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); + [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); + [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)captureUserFeedback:(SentryUserFeedback * _Nonnull)userFeedback __attribute__((swift_name("capture(userFeedback:)"))) __attribute__((deprecated("Use -[SentryClient captureFeedback:withScope:]."))); - [Export ("captureUserFeedback:")] - void CaptureUserFeedback (SentryUserFeedback userFeedback); + [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); + [Export("captureFeedback:withScope:")] + void CaptureFeedback(SentryFeedback feedback, SentryScope scope); // -(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)"))); - [Export ("flush:")] - void Flush (double timeout); + [Export("flush:")] + void Flush(double timeout); // -(void)close; - [Export ("close")] - void Close (); + [Export("close")] + void Close(); } // @interface SentryDebugImageProvider : NSObject -[BaseType (typeof(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); + [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); + [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); + [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); + [Export("getDebugImagesForFrames:isCrash:")] + SentryDebugMeta[] GetDebugImagesForFrames(SentryFrame[] frames, bool isCrash); // -(NSArray * _Nonnull)getDebugImages __attribute__((deprecated("Use -[getDebugImagesCrashed:] instead."))); - [Export ("getDebugImages")] + [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); + [Export("getDebugImagesCrashed:")] + SentryDebugMeta[] GetDebugImagesCrashed(bool isCrash); } // @interface SentryDebugMeta : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryDebugMeta : SentrySerializable { // @property (copy, nonatomic) NSString * _Nullable uuid; - [NullAllowed, Export ("uuid")] + [NullAllowed, Export("uuid")] string Uuid { get; set; } // @property (copy, nonatomic) NSString * _Nullable debugID; - [NullAllowed, Export ("debugID")] + [NullAllowed, Export("debugID")] string DebugID { get; set; } // @property (copy, nonatomic) NSString * _Nullable type; - [NullAllowed, Export ("type")] + [NullAllowed, Export("type")] string Type { get; set; } // @property (copy, nonatomic) NSString * _Nullable name; - [NullAllowed, Export ("name")] + [NullAllowed, Export("name")] string Name { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable imageSize; - [NullAllowed, Export ("imageSize", ArgumentSemantic.Copy)] + [NullAllowed, Export("imageSize", ArgumentSemantic.Copy)] NSNumber ImageSize { get; set; } // @property (copy, nonatomic) NSString * _Nullable imageAddress; - [NullAllowed, Export ("imageAddress")] + [NullAllowed, Export("imageAddress")] string ImageAddress { get; set; } // @property (copy, nonatomic) NSString * _Nullable imageVmAddress; - [NullAllowed, Export ("imageVmAddress")] + [NullAllowed, Export("imageVmAddress")] string ImageVmAddress { get; set; } // @property (copy, nonatomic) NSString * _Nullable codeFile; - [NullAllowed, Export ("codeFile")] + [NullAllowed, Export("codeFile")] string CodeFile { get; set; } } // @interface SentryDsn : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryDsn { // @property (readonly, nonatomic, strong) NSURL * _Nonnull url; - [Export ("url", ArgumentSemantic.Strong)] + [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); + [Export("initWithString:didFailWithError:")] + NativeHandle Constructor(string dsnString, [NullAllowed] out NSError error); // -(NSString * _Nonnull)getHash; - [Export ("getHash")] + [Export("getHash")] string Hash { get; } // -(NSURL * _Nonnull)getStoreEndpoint __attribute__((deprecated("This endpoint is no longer used"))); - [Export ("getStoreEndpoint")] + [Export("getStoreEndpoint")] NSUrl StoreEndpoint { get; } // -(NSURL * _Nonnull)getEnvelopeEndpoint; - [Export ("getEnvelopeEndpoint")] + [Export("getEnvelopeEndpoint")] NSUrl EnvelopeEndpoint { get; } } -// @interface SentryEnvelopeItemHeader : NSObject -[BaseType (typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryEnvelopeItemHeader : SentrySerializable -{ - // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length __attribute__((objc_designated_initializer)); - [Export ("initWithType:length:")] - [DesignatedInitializer] - NativeHandle Constructor (string type, nuint length); - - // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length contentType:(NSString * _Nonnull)contentType; - [Export ("initWithType:length:contentType:")] - NativeHandle Constructor (string type, nuint length, string contentType); - - // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length filenname:(NSString * _Nonnull)filename contentType:(NSString * _Nonnull)contentType; - [Export ("initWithType:length:filenname:contentType:")] - NativeHandle Constructor (string type, nuint length, string filename, string contentType); - - // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type length:(NSUInteger)length contentType:(NSString * _Nullable)contentType itemCount:(NSNumber * _Nonnull)itemCount; - [Export ("initWithType:length:contentType:itemCount:")] - NativeHandle Constructor (string type, nuint length, [NullAllowed] string contentType, NSNumber itemCount); - - // @property (readonly, copy, nonatomic) NSString * _Nonnull type; - [Export ("type")] - string Type { get; } - - // @property (readonly, nonatomic) NSUInteger length; - [Export ("length")] - nuint Length { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable filename; - [NullAllowed, Export ("filename")] - string Filename { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable contentType; - [NullAllowed, Export ("contentType")] - string ContentType { get; } - - // @property (readonly, copy, nonatomic) NSNumber * _Nullable itemCount; - [NullAllowed, Export ("itemCount", ArgumentSemantic.Copy)] - NSNumber ItemCount { get; } - - // @property (copy, nonatomic) NSString * _Nullable platform; - [NullAllowed, Export ("platform")] - string Platform { get; set; } -} - -partial interface Constants -{ - // extern NSString *const _Nonnull SentryErrorDomain __attribute__((visibility("default"))); - [Field ("SentryErrorDomain", "__Internal")] - NSString SentryErrorDomain { get; } -} - // @interface SentryEvent : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryEvent : SentrySerializable { // @property (nonatomic, strong) SentryId * _Nonnull eventId; - [Export ("eventId", ArgumentSemantic.Strong)] + [Export("eventId", ArgumentSemantic.Strong)] SentryId EventId { get; set; } // @property (nonatomic, strong) SentryMessage * _Nullable message; - [NullAllowed, Export ("message", ArgumentSemantic.Strong)] + [NullAllowed, Export("message", ArgumentSemantic.Strong)] SentryMessage Message { get; set; } // @property (copy, nonatomic) NSError * _Nullable error; - [NullAllowed, Export ("error", ArgumentSemantic.Copy)] + [NullAllowed, Export("error", ArgumentSemantic.Copy)] NSError Error { get; set; } // @property (nonatomic, strong) NSDate * _Nullable timestamp; - [NullAllowed, Export ("timestamp", ArgumentSemantic.Strong)] + [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] NSDate Timestamp { get; set; } // @property (nonatomic, strong) NSDate * _Nullable startTimestamp; - [NullAllowed, Export ("startTimestamp", ArgumentSemantic.Strong)] + [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] NSDate StartTimestamp { get; set; } // @property (nonatomic) enum SentryLevel level; - [Export ("level", ArgumentSemantic.Assign)] + [Export("level", ArgumentSemantic.Assign)] SentryLevel Level { get; set; } // @property (copy, nonatomic) NSString * _Nonnull platform; - [Export ("platform")] + [Export("platform")] string Platform { get; set; } // @property (copy, nonatomic) NSString * _Nullable logger; - [NullAllowed, Export ("logger")] + [NullAllowed, Export("logger")] string Logger { get; set; } // @property (copy, nonatomic) NSString * _Nullable serverName; - [NullAllowed, Export ("serverName")] + [NullAllowed, Export("serverName")] string ServerName { get; set; } // @property (copy, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export ("releaseName")] + [NullAllowed, Export("releaseName")] string ReleaseName { get; set; } // @property (copy, nonatomic) NSString * _Nullable dist; - [NullAllowed, Export ("dist")] + [NullAllowed, Export("dist")] string Dist { get; set; } // @property (copy, nonatomic) NSString * _Nullable environment; - [NullAllowed, Export ("environment")] + [NullAllowed, Export("environment")] string Environment { get; set; } // @property (copy, nonatomic) NSString * _Nullable transaction; - [NullAllowed, Export ("transaction")] + [NullAllowed, Export("transaction")] string Transaction { get; set; } // @property (copy, nonatomic) NSString * _Nullable type; - [NullAllowed, Export ("type")] + [NullAllowed, Export("type")] string Type { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable tags; - [NullAllowed, Export ("tags", ArgumentSemantic.Strong)] + [NullAllowed, Export("tags", ArgumentSemantic.Strong)] NSDictionary Tags { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable extra; - [NullAllowed, Export ("extra", ArgumentSemantic.Strong)] + [NullAllowed, Export("extra", ArgumentSemantic.Strong)] NSDictionary Extra { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable sdk; - [NullAllowed, Export ("sdk", ArgumentSemantic.Strong)] + [NullAllowed, Export("sdk", ArgumentSemantic.Strong)] NSDictionary Sdk { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable modules; - [NullAllowed, Export ("modules", ArgumentSemantic.Strong)] + [NullAllowed, Export("modules", ArgumentSemantic.Strong)] NSDictionary Modules { get; set; } // @property (nonatomic, strong) NSArray * _Nullable fingerprint; - [NullAllowed, Export ("fingerprint", ArgumentSemantic.Strong)] + [NullAllowed, Export("fingerprint", ArgumentSemantic.Strong)] string[] Fingerprint { get; set; } // @property (nonatomic, strong) SentryUser * _Nullable user; - [NullAllowed, Export ("user", ArgumentSemantic.Strong)] + [NullAllowed, Export("user", ArgumentSemantic.Strong)] SentryUser User { get; set; } // @property (nonatomic, strong) NSDictionary *> * _Nullable context; - [NullAllowed, Export ("context", ArgumentSemantic.Strong)] + [NullAllowed, Export("context", ArgumentSemantic.Strong)] NSDictionary> Context { get; set; } // @property (nonatomic, strong) NSArray * _Nullable threads; - [NullAllowed, Export ("threads", ArgumentSemantic.Strong)] + [NullAllowed, Export("threads", ArgumentSemantic.Strong)] SentryThread[] Threads { get; set; } // @property (nonatomic, strong) NSArray * _Nullable exceptions; - [NullAllowed, Export ("exceptions", ArgumentSemantic.Strong)] + [NullAllowed, Export("exceptions", ArgumentSemantic.Strong)] SentryException[] Exceptions { get; set; } // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; - [NullAllowed, Export ("stacktrace", ArgumentSemantic.Strong)] + [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] SentryStacktrace Stacktrace { get; set; } // @property (nonatomic, strong) NSArray * _Nullable debugMeta; - [NullAllowed, Export ("debugMeta", ArgumentSemantic.Strong)] + [NullAllowed, Export("debugMeta", ArgumentSemantic.Strong)] SentryDebugMeta[] DebugMeta { get; set; } // @property (nonatomic, strong) NSArray * _Nullable breadcrumbs; - [NullAllowed, Export ("breadcrumbs", ArgumentSemantic.Strong)] + [NullAllowed, Export("breadcrumbs", ArgumentSemantic.Strong)] SentryBreadcrumb[] Breadcrumbs { get; set; } // @property (nonatomic, strong) SentryRequest * _Nullable request; - [NullAllowed, Export ("request", ArgumentSemantic.Strong)] + [NullAllowed, Export("request", ArgumentSemantic.Strong)] SentryRequest Request { get; set; } // -(instancetype _Nonnull)initWithLevel:(enum SentryLevel)level __attribute__((objc_designated_initializer)); - [Export ("initWithLevel:")] + [Export("initWithLevel:")] [DesignatedInitializer] - NativeHandle Constructor (SentryLevel level); + NativeHandle Constructor(SentryLevel level); // -(instancetype _Nonnull)initWithError:(NSError * _Nonnull)error; - [Export ("initWithError:")] - NativeHandle Constructor (NSError error); + [Export("initWithError:")] + NativeHandle Constructor(NSError error); } // @interface SentryException : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryException : SentrySerializable { // @property (copy, nonatomic) NSString * _Nonnull value; - [Export ("value")] + [Export("value")] string Value { get; set; } // @property (copy, nonatomic) NSString * _Nonnull type; - [Export ("type")] + [Export("type")] string Type { get; set; } // @property (nonatomic, strong) SentryMechanism * _Nullable mechanism; - [NullAllowed, Export ("mechanism", ArgumentSemantic.Strong)] + [NullAllowed, Export("mechanism", ArgumentSemantic.Strong)] SentryMechanism Mechanism { get; set; } // @property (copy, nonatomic) NSString * _Nullable module; - [NullAllowed, Export ("module")] + [NullAllowed, Export("module")] string Module { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable threadId; - [NullAllowed, Export ("threadId", ArgumentSemantic.Copy)] + [NullAllowed, Export("threadId", ArgumentSemantic.Copy)] NSNumber ThreadId { get; set; } // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; - [NullAllowed, Export ("stacktrace", ArgumentSemantic.Strong)] + [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] SentryStacktrace Stacktrace { get; set; } // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value type:(NSString * _Nonnull)type; - [Export ("initWithValue:type:")] - NativeHandle Constructor (string value, string type); + [Export("initWithValue:type:")] + NativeHandle Constructor(string value, string type); } // @interface SentryFeedbackAPI : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryFeedbackAPI { - // -(void)showWidget __attribute__((availability(ios, introduced=13.0))) __attribute__((availability(macos_app_extension, unavailable))) __attribute__((availability(ios_app_extension, unavailable))); - [Export ("showWidget")] - void ShowWidget (); - - // -(void)hideWidget __attribute__((availability(ios, introduced=13.0))) __attribute__((availability(macos_app_extension, unavailable))) __attribute__((availability(ios_app_extension, unavailable))); - [Export ("hideWidget")] - void HideWidget (); + [Export("showWidget")] + void ShowWidget(); + [Export("hideWidget")] + void HideWidget(); } // @interface SentryFrame : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryFrame : SentrySerializable { // @property (copy, nonatomic) NSString * _Nullable symbolAddress; - [NullAllowed, Export ("symbolAddress")] + [NullAllowed, Export("symbolAddress")] string SymbolAddress { get; set; } // @property (copy, nonatomic) NSString * _Nullable fileName; - [NullAllowed, Export ("fileName")] + [NullAllowed, Export("fileName")] string FileName { get; set; } // @property (copy, nonatomic) NSString * _Nullable function; - [NullAllowed, Export ("function")] + [NullAllowed, Export("function")] string Function { get; set; } // @property (copy, nonatomic) NSString * _Nullable module; - [NullAllowed, Export ("module")] + [NullAllowed, Export("module")] string Module { get; set; } // @property (copy, nonatomic) NSString * _Nullable package; - [NullAllowed, Export ("package")] + [NullAllowed, Export("package")] string Package { get; set; } // @property (copy, nonatomic) NSString * _Nullable imageAddress; - [NullAllowed, Export ("imageAddress")] + [NullAllowed, Export("imageAddress")] string ImageAddress { get; set; } // @property (copy, nonatomic) NSString * _Nullable platform; - [NullAllowed, Export ("platform")] + [NullAllowed, Export("platform")] string Platform { get; set; } // @property (copy, nonatomic) NSString * _Nullable instructionAddress; - [NullAllowed, Export ("instructionAddress")] + [NullAllowed, Export("instructionAddress")] string InstructionAddress { get; set; } // @property (nonatomic) NSUInteger instruction; - [Export ("instruction")] + [Export("instruction")] nuint Instruction { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable lineNumber; - [NullAllowed, Export ("lineNumber", ArgumentSemantic.Copy)] + [NullAllowed, Export("lineNumber", ArgumentSemantic.Copy)] NSNumber LineNumber { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable columnNumber; - [NullAllowed, Export ("columnNumber", ArgumentSemantic.Copy)] + [NullAllowed, Export("columnNumber", ArgumentSemantic.Copy)] NSNumber ColumnNumber { get; set; } // @property (copy, nonatomic) NSString * _Nullable contextLine; - [NullAllowed, Export ("contextLine")] + [NullAllowed, Export("contextLine")] string ContextLine { get; set; } // @property (copy, nonatomic) NSArray * _Nullable preContext; - [NullAllowed, Export ("preContext", ArgumentSemantic.Copy)] + [NullAllowed, Export("preContext", ArgumentSemantic.Copy)] string[] PreContext { get; set; } // @property (copy, nonatomic) NSArray * _Nullable postContext; - [NullAllowed, Export ("postContext", ArgumentSemantic.Copy)] + [NullAllowed, Export("postContext", ArgumentSemantic.Copy)] string[] PostContext { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable inApp; - [NullAllowed, Export ("inApp", ArgumentSemantic.Copy)] + [NullAllowed, Export("inApp", ArgumentSemantic.Copy)] NSNumber InApp { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable stackStart; - [NullAllowed, Export ("stackStart", ArgumentSemantic.Copy)] + [NullAllowed, Export("stackStart", ArgumentSemantic.Copy)] NSNumber StackStart { get; set; } // @property (copy, nonatomic) NSDictionary * _Nullable vars; - [NullAllowed, Export ("vars", ArgumentSemantic.Copy)] + [NullAllowed, Export("vars", ArgumentSemantic.Copy)] NSDictionary Vars { get; set; } } // @interface SentryGeo : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryGeo : SentrySerializable { // @property (copy, atomic) NSString * _Nullable city; - [NullAllowed, Export ("city")] + [NullAllowed, Export("city")] string City { get; set; } // @property (copy, atomic) NSString * _Nullable countryCode; - [NullAllowed, Export ("countryCode")] + [NullAllowed, Export("countryCode")] string CountryCode { get; set; } // @property (copy, atomic) NSString * _Nullable region; - [NullAllowed, Export ("region")] + [NullAllowed, Export("region")] string Region { get; set; } // -(BOOL)isEqualToGeo:(SentryGeo * _Nonnull)geo; - [Export ("isEqualToGeo:")] - bool IsEqualToGeo (SentryGeo geo); + [Export("isEqualToGeo:")] + bool IsEqualToGeo(SentryGeo geo); // -(NSUInteger)hash; - [Export ("hash")] + [Export("hash")] nuint Hash { get; } } // @interface SentryHttpStatusCodeRange : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryHttpStatusCodeRange { // @property (readonly, nonatomic) NSInteger min; - [Export ("min")] + [Export("min")] nint Min { get; } // @property (readonly, nonatomic) NSInteger max; - [Export ("max")] + [Export("max")] nint Max { get; } // -(instancetype _Nonnull)initWithMin:(NSInteger)min max:(NSInteger)max; - [Export ("initWithMin:max:")] - NativeHandle Constructor (nint min, nint max); + [Export("initWithMin:max:")] + NativeHandle Constructor(nint min, nint max); // -(instancetype _Nonnull)initWithStatusCode:(NSInteger)statusCode; - [Export ("initWithStatusCode:")] - NativeHandle Constructor (nint statusCode); + [Export("initWithStatusCode:")] + NativeHandle Constructor(nint statusCode); } // @interface SentrySpanContext : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentrySpanContext : SentrySerializable { // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export ("traceId")] + [Export("traceId")] SentryId TraceId { get; } // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; - [Export ("spanId")] + [Export("spanId")] SentrySpanId SpanId { get; } // @property (readonly, nonatomic) SentrySpanId * _Nullable parentSpanId; - [NullAllowed, Export ("parentSpanId")] + [NullAllowed, Export("parentSpanId")] SentrySpanId ParentSpanId { get; } // @property (readonly, nonatomic) SentrySampleDecision sampled; - [Export ("sampled")] + [Export("sampled")] SentrySampleDecision Sampled { get; } // @property (readonly, copy, nonatomic) NSString * _Nonnull operation; - [Export ("operation")] + [Export("operation")] string Operation { get; } + // @property (readonly, copy, nonatomic) NSString * _Nullable spanDescription; + [NullAllowed, Export("spanDescription")] + string SpanDescription { get; } + // @property (copy, nonatomic) NSString * _Nonnull origin; - [Export ("origin")] + [Export("origin")] string Origin { get; set; } // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation; - [Export ("initWithOperation:")] - NativeHandle Constructor (string operation); + [Export("initWithOperation:")] + NativeHandle Constructor(string operation); // -(instancetype _Nonnull)initWithOperation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled; - [Export ("initWithOperation:sampled:")] - NativeHandle Constructor (string operation, SentrySampleDecision sampled); + [Export("initWithOperation:sampled:")] + NativeHandle Constructor(string operation, SentrySampleDecision sampled); // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentId:(SentrySpanId * _Nullable)parentId operation:(NSString * _Nonnull)operation sampled:(SentrySampleDecision)sampled; - [Export ("initWithTraceId:spanId:parentId:operation:sampled:")] - NativeHandle Constructor (SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, SentrySampleDecision sampled); + [Export("initWithTraceId:spanId:parentId:operation:sampled:")] + NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, SentrySampleDecision sampled); // -(instancetype _Nonnull)initWithTraceId:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId parentId:(SentrySpanId * _Nullable)parentId operation:(NSString * _Nonnull)operation spanDescription:(NSString * _Nullable)description sampled:(SentrySampleDecision)sampled; - [Export ("initWithTraceId:spanId:parentId:operation:spanDescription:sampled:")] - NativeHandle Constructor (SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, [NullAllowed] string description, SentrySampleDecision sampled); + [Export("initWithTraceId:spanId:parentId:operation:spanDescription:sampled:")] + NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentId, string operation, [NullAllowed] string description, SentrySampleDecision sampled); } // @protocol SentrySpan [Protocol] -[Model] [Internal] +[Model] [BaseType (typeof(NSObject))] interface SentrySpan : SentrySerializable { // @required @property (nonatomic, strong) SentryId * _Nonnull traceId; [Abstract] - [Export ("traceId", ArgumentSemantic.Strong)] + [Export("traceId", ArgumentSemantic.Strong)] SentryId TraceId { get; set; } // @required @property (nonatomic, strong) SentrySpanId * _Nonnull spanId; [Abstract] - [Export ("spanId", ArgumentSemantic.Strong)] + [Export("spanId", ArgumentSemantic.Strong)] SentrySpanId SpanId { get; set; } // @required @property (nonatomic, strong) SentrySpanId * _Nullable parentSpanId; [Abstract] - [NullAllowed, Export ("parentSpanId", ArgumentSemantic.Strong)] + [NullAllowed, Export("parentSpanId", ArgumentSemantic.Strong)] SentrySpanId ParentSpanId { get; set; } // @required @property (nonatomic) SentrySampleDecision sampled; [Abstract] - [Export ("sampled", ArgumentSemantic.Assign)] + [Export("sampled", ArgumentSemantic.Assign)] SentrySampleDecision Sampled { get; set; } // @required @property (copy, nonatomic) NSString * _Nonnull operation; [Abstract] - [Export ("operation")] + [Export("operation")] string Operation { get; set; } // @required @property (copy, nonatomic) NSString * _Nonnull origin; [Abstract] - [Export ("origin")] + [Export("origin")] string Origin { get; set; } + // @required @property (copy, nonatomic) NSString * _Nullable spanDescription; + [Abstract] + [NullAllowed, Export("spanDescription")] + string SpanDescription { get; set; } + // @required @property (nonatomic) SentrySpanStatus status; [Abstract] - [Export ("status", ArgumentSemantic.Assign)] + [Export("status", ArgumentSemantic.Assign)] SentrySpanStatus Status { get; set; } // @required @property (nonatomic, strong) NSDate * _Nullable timestamp; [Abstract] - [NullAllowed, Export ("timestamp", ArgumentSemantic.Strong)] + [NullAllowed, Export("timestamp", ArgumentSemantic.Strong)] NSDate Timestamp { get; set; } // @required @property (nonatomic, strong) NSDate * _Nullable startTimestamp; [Abstract] - [NullAllowed, Export ("startTimestamp", ArgumentSemantic.Strong)] + [NullAllowed, Export("startTimestamp", ArgumentSemantic.Strong)] NSDate StartTimestamp { get; set; } // @required @property (readonly) NSDictionary * _Nonnull data; [Abstract] - [Export ("data")] + [Export("data")] NSDictionary Data { get; } // @required @property (readonly) NSDictionary * _Nonnull tags; [Abstract] - [Export ("tags")] + [Export("tags")] NSDictionary Tags { get; } // @required @property (readonly) BOOL isFinished; [Abstract] - [Export ("isFinished")] + [Export("isFinished")] bool IsFinished { get; } // @required @property (readonly, nonatomic) SentryTraceContext * _Nullable traceContext; [Abstract] - [NullAllowed, Export ("traceContext")] + [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); + [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); + [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); + [Export("setDataValue:forKey:")] + void SetDataValue([NullAllowed] NSObject value, string key); // @required -(void)setExtraValue:(id _Nullable)value forKey:(NSString * _Nonnull)key __attribute__((deprecated(""))) __attribute__((swift_name("setExtra(value:key:)"))); [Abstract] - [Export ("setExtraValue:forKey:")] - void SetExtraValue ([NullAllowed] NSObject value, string key); + [Export("setExtraValue:forKey:")] + void SetExtraValue([NullAllowed] NSObject value, string key); // @required -(void)removeDataForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeData(key:)"))); [Abstract] - [Export ("removeDataForKey:")] - void RemoveDataForKey (string key); + [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); + [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); + [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); + [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); + [Export("setMeasurement:value:unit:")] + void SetMeasurement(string name, NSNumber value, SentryMeasurementUnit unit); // @required -(void)finish; [Abstract] - [Export ("finish")] - void Finish (); + [Export("finish")] + void Finish(); // @required -(void)finishWithStatus:(SentrySpanStatus)status __attribute__((swift_name("finish(status:)"))); [Abstract] - [Export ("finishWithStatus:")] - void FinishWithStatus (SentrySpanStatus status); + [Export("finishWithStatus:")] + void FinishWithStatus(SentrySpanStatus status); // @required -(SentryTraceHeader * _Nonnull)toTraceHeader; [Abstract] - [Export ("toTraceHeader")] + [Export("toTraceHeader")] SentryTraceHeader ToTraceHeader(); // @required -(NSString * _Nullable)baggageHttpHeader; [Abstract] - [NullAllowed, Export ("baggageHttpHeader")] + [NullAllowed, Export("baggageHttpHeader")] string BaggageHttpHeader { get; } // @required -(NSDictionary * _Nonnull)serialize; [Abstract] - [Export ("serialize")] + [Export("serialize")] NSDictionary Serialize(); } // @interface SentryHub : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryHub { // -(instancetype _Nonnull)initWithClient:(SentryClient * _Nullable)client andScope:(SentryScope * _Nullable)scope; - [Export ("initWithClient:andScope:")] - NativeHandle Constructor ([NullAllowed] SentryClient client, [NullAllowed] SentryScope scope); + [Export("initWithClient:andScope:")] + NativeHandle Constructor([NullAllowed] SentryClient client, [NullAllowed] SentryScope scope); // -(void)startSession; - [Export ("startSession")] - void StartSession (); + [Export("startSession")] + void StartSession(); // -(void)endSession; - [Export ("endSession")] - void EndSession (); + [Export("endSession")] + void EndSession(); // -(void)endSessionWithTimestamp:(NSDate * _Nonnull)timestamp; - [Export ("endSessionWithTimestamp:")] - void EndSessionWithTimestamp (NSDate timestamp); + [Export("endSessionWithTimestamp:")] + void EndSessionWithTimestamp(NSDate timestamp); // -(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event __attribute__((swift_name("capture(event:)"))); - [Export ("captureEvent:")] - SentryId CaptureEvent (SentryEvent @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); + [Export("captureEvent:withScope:")] + SentryId CaptureEvent(SentryEvent @event, SentryScope scope); // -(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation __attribute__((swift_name("startTransaction(name:operation:)"))); - [Export ("startTransactionWithName:operation:")] - SentrySpan StartTransactionWithName (string name, string operation); + [Export("startTransactionWithName:operation:")] + SentrySpan StartTransactionWithName(string name, string operation); // -(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope __attribute__((swift_name("startTransaction(name:operation:bindToScope:)"))); - [Export ("startTransactionWithName:operation:bindToScope:")] - SentrySpan StartTransactionWithName (string name, string operation, bool bindToScope); + [Export("startTransactionWithName:operation:bindToScope:")] + SentrySpan StartTransactionWithName(string name, string operation, bool bindToScope); // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext __attribute__((swift_name("startTransaction(transactionContext:)"))); - [Export ("startTransactionWithContext:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext); + [Export("startTransactionWithContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext); // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope __attribute__((swift_name("startTransaction(transactionContext:bindToScope:)"))); - [Export ("startTransactionWithContext:bindToScope:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, bool bindToScope); + [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); + [Export("startTransactionWithContext:bindToScope:customSamplingContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope, NSDictionary customSamplingContext); // -(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext __attribute__((swift_name("startTransaction(transactionContext:customSamplingContext:)"))); - [Export ("startTransactionWithContext:customSamplingContext:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, NSDictionary customSamplingContext); + [Export("startTransactionWithContext:customSamplingContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); // -(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error __attribute__((swift_name("capture(error:)"))); - [Export ("captureError:")] - SentryId CaptureError (NSError error); + [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); + [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); + [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); + [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); + [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)captureUserFeedback:(SentryUserFeedback * _Nonnull)userFeedback __attribute__((swift_name("capture(userFeedback:)"))) __attribute__((deprecated("Use -[SentryHub captureFeedback:]."))); - [Export ("captureUserFeedback:")] - void CaptureUserFeedback (SentryUserFeedback userFeedback); + [Export("captureMessage:withScope:")] + SentryId CaptureMessage(string message, SentryScope scope); // -(void)captureFeedback:(SentryFeedback * _Nonnull)feedback; - [Export ("captureFeedback:")] - void CaptureFeedback (SentryFeedback feedback); + [Export("captureFeedback:")] + void CaptureFeedback(SentryFeedback feedback); // -(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback; - [Export ("configureScope:")] - void ConfigureScope (Action callback); + [Export("configureScope:")] + void ConfigureScope(Action callback); // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb; - [Export ("addBreadcrumb:")] - void AddBreadcrumb (SentryBreadcrumb crumb); + [Export("addBreadcrumb:")] + void AddBreadcrumb(SentryBreadcrumb crumb); // -(SentryClient * _Nullable)getClient; - [NullAllowed, Export ("getClient")] + [NullAllowed, Export("getClient")] SentryClient Client { get; } // @property (readonly, nonatomic, strong) SentryScope * _Nonnull scope; - [Export ("scope", ArgumentSemantic.Strong)] + [Export("scope", ArgumentSemantic.Strong)] SentryScope Scope { get; } // -(void)bindClient:(SentryClient * _Nullable)client; - [Export ("bindClient:")] - void BindClient ([NullAllowed] SentryClient client); + [Export("bindClient:")] + void BindClient([NullAllowed] SentryClient client); // -(BOOL)hasIntegration:(NSString * _Nonnull)integrationName; - [Export ("hasIntegration:")] - bool HasIntegration (string integrationName); + [Export("hasIntegration:")] + bool HasIntegration(string integrationName); // -(BOOL)isIntegrationInstalled:(Class _Nonnull)integrationClass; - [Export ("isIntegrationInstalled:")] - bool IsIntegrationInstalled (Class integrationClass); + [Export("isIntegrationInstalled:")] + bool IsIntegrationInstalled(Class integrationClass); // -(void)setUser:(SentryUser * _Nullable)user; - [Export ("setUser:")] - void SetUser ([NullAllowed] SentryUser user); + [Export("setUser:")] + void SetUser([NullAllowed] SentryUser user); // -(void)reportFullyDisplayed; - [Export ("reportFullyDisplayed")] - void ReportFullyDisplayed (); + [Export("reportFullyDisplayed")] + void ReportFullyDisplayed(); // -(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)"))); - [Export ("flush:")] - void Flush (double timeout); + [Export("flush:")] + void Flush(double timeout); // -(void)close; - [Export ("close")] - void Close (); -} - -// @protocol SentryIntegrationProtocol -[Protocol] -[BaseType (typeof(NSObject))] -[Internal] -interface SentryIntegrationProtocol -{ - // @required -(BOOL)installWithOptions:(SentryOptions * _Nonnull)options __attribute__((swift_name("install(with:)"))); - [Abstract] - [Export ("installWithOptions:")] - bool InstallWithOptions (SentryOptions options); - - // @required -(void)uninstall; - [Abstract] - [Export ("uninstall")] - void Uninstall (); + [Export("close")] + void Close(); } // @interface SentryMeasurementUnit : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryMeasurementUnit { // -(instancetype _Nonnull)initWithUnit:(NSString * _Nonnull)unit; - [Export ("initWithUnit:")] - NativeHandle Constructor (string unit); + [Export("initWithUnit:")] + NativeHandle Constructor(string unit); // @property (readonly, copy) NSString * _Nonnull unit; - [Export ("unit")] + [Export("unit")] string Unit { get; } // @property (readonly, copy, class) SentryMeasurementUnit * _Nonnull none; [Static] - [Export ("none", ArgumentSemantic.Copy)] + [Export("none", ArgumentSemantic.Copy)] SentryMeasurementUnit None { get; } } // @interface SentryMeasurementUnitDuration : SentryMeasurementUnit -[BaseType (typeof(SentryMeasurementUnit))] +[BaseType(typeof(SentryMeasurementUnit))] [DisableDefaultCtor] [Internal] interface SentryMeasurementUnitDuration { // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull nanosecond; [Static] - [Export ("nanosecond", ArgumentSemantic.Copy)] + [Export("nanosecond", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Nanosecond { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull microsecond; [Static] - [Export ("microsecond", ArgumentSemantic.Copy)] + [Export("microsecond", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Microsecond { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull millisecond; [Static] - [Export ("millisecond", ArgumentSemantic.Copy)] + [Export("millisecond", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Millisecond { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull second; [Static] - [Export ("second", ArgumentSemantic.Copy)] + [Export("second", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Second { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull minute; [Static] - [Export ("minute", ArgumentSemantic.Copy)] + [Export("minute", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Minute { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull hour; [Static] - [Export ("hour", ArgumentSemantic.Copy)] + [Export("hour", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Hour { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull day; [Static] - [Export ("day", ArgumentSemantic.Copy)] + [Export("day", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Day { get; } // @property (readonly, copy, class) SentryMeasurementUnitDuration * _Nonnull week; [Static] - [Export ("week", ArgumentSemantic.Copy)] + [Export("week", ArgumentSemantic.Copy)] SentryMeasurementUnitDuration Week { get; } } // @interface SentryMeasurementUnitInformation : SentryMeasurementUnit -[BaseType (typeof(SentryMeasurementUnit))] +[BaseType(typeof(SentryMeasurementUnit))] [DisableDefaultCtor] [Internal] interface SentryMeasurementUnitInformation { // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull bit; [Static] - [Export ("bit", ArgumentSemantic.Copy)] + [Export("bit", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Bit { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull byte; [Static] - [Export ("byte", ArgumentSemantic.Copy)] + [Export("byte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Byte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kilobyte; [Static] - [Export ("kilobyte", ArgumentSemantic.Copy)] + [Export("kilobyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Kilobyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull kibibyte; [Static] - [Export ("kibibyte", ArgumentSemantic.Copy)] + [Export("kibibyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Kibibyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull megabyte; [Static] - [Export ("megabyte", ArgumentSemantic.Copy)] + [Export("megabyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Megabyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull mebibyte; [Static] - [Export ("mebibyte", ArgumentSemantic.Copy)] + [Export("mebibyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Mebibyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull gigabyte; [Static] - [Export ("gigabyte", ArgumentSemantic.Copy)] + [Export("gigabyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Gigabyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull gibibyte; [Static] - [Export ("gibibyte", ArgumentSemantic.Copy)] + [Export("gibibyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Gibibyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull terabyte; [Static] - [Export ("terabyte", ArgumentSemantic.Copy)] + [Export("terabyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Terabyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull tebibyte; [Static] - [Export ("tebibyte", ArgumentSemantic.Copy)] + [Export("tebibyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Tebibyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull petabyte; [Static] - [Export ("petabyte", ArgumentSemantic.Copy)] + [Export("petabyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Petabyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull pebibyte; [Static] - [Export ("pebibyte", ArgumentSemantic.Copy)] + [Export("pebibyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Pebibyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull exabyte; [Static] - [Export ("exabyte", ArgumentSemantic.Copy)] + [Export("exabyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Exabyte { get; } // @property (readonly, copy, class) SentryMeasurementUnitInformation * _Nonnull exbibyte; [Static] - [Export ("exbibyte", ArgumentSemantic.Copy)] + [Export("exbibyte", ArgumentSemantic.Copy)] SentryMeasurementUnitInformation Exbibyte { get; } } // @interface SentryMeasurementUnitFraction : SentryMeasurementUnit -[BaseType (typeof(SentryMeasurementUnit))] +[BaseType(typeof(SentryMeasurementUnit))] [DisableDefaultCtor] [Internal] interface SentryMeasurementUnitFraction { // @property (readonly, copy, class) SentryMeasurementUnitFraction * _Nonnull ratio; [Static] - [Export ("ratio", ArgumentSemantic.Copy)] + [Export("ratio", ArgumentSemantic.Copy)] SentryMeasurementUnitFraction Ratio { get; } // @property (readonly, copy, class) SentryMeasurementUnitFraction * _Nonnull percent; [Static] - [Export ("percent", ArgumentSemantic.Copy)] + [Export("percent", ArgumentSemantic.Copy)] SentryMeasurementUnitFraction Percent { get; } } // @interface SentryMechanism : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryMechanism : SentrySerializable { // @property (copy, nonatomic) NSString * _Nonnull type; - [Export ("type")] + [Export("type")] string Type { get; set; } // @property (copy, nonatomic) NSString * _Nullable desc; - [NullAllowed, Export ("desc")] + [NullAllowed, Export("desc")] string Desc { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable data; - [NullAllowed, Export ("data", ArgumentSemantic.Strong)] + [NullAllowed, Export("data", ArgumentSemantic.Strong)] NSDictionary Data { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable handled; - [NullAllowed, Export ("handled", ArgumentSemantic.Copy)] + [NullAllowed, Export("handled", ArgumentSemantic.Copy)] NSNumber Handled { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable synthetic; - [NullAllowed, Export ("synthetic", ArgumentSemantic.Copy)] + [NullAllowed, Export("synthetic", ArgumentSemantic.Copy)] NSNumber Synthetic { get; set; } // @property (copy, nonatomic) NSString * _Nullable helpLink; - [NullAllowed, Export ("helpLink")] + [NullAllowed, Export("helpLink")] string HelpLink { get; set; } // @property (nonatomic, strong) SentryMechanismMeta * _Nullable meta; - [NullAllowed, Export ("meta", ArgumentSemantic.Strong)] + [NullAllowed, Export("meta", ArgumentSemantic.Strong)] SentryMechanismMeta Meta { get; set; } // -(instancetype _Nonnull)initWithType:(NSString * _Nonnull)type; - [Export ("initWithType:")] - NativeHandle Constructor (string type); + [Export("initWithType:")] + NativeHandle Constructor(string type); } // @interface SentryMechanismMeta : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryMechanismMeta : SentrySerializable { // @property (nonatomic, strong) NSDictionary * _Nullable signal; - [NullAllowed, Export ("signal", ArgumentSemantic.Strong)] + [NullAllowed, Export("signal", ArgumentSemantic.Strong)] NSDictionary Signal { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable machException; - [NullAllowed, Export ("machException", ArgumentSemantic.Strong)] + [NullAllowed, Export("machException", ArgumentSemantic.Strong)] NSDictionary MachException { get; set; } // @property (nonatomic, strong) SentryNSError * _Nullable error; - [NullAllowed, Export ("error", ArgumentSemantic.Strong)] + [NullAllowed, Export("error", ArgumentSemantic.Strong)] SentryNSError Error { get; set; } } // @interface SentryMessage : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryMessage : SentrySerializable { // -(instancetype _Nonnull)initWithFormatted:(NSString * _Nonnull)formatted; - [Export ("initWithFormatted:")] - NativeHandle Constructor (string formatted); + [Export("initWithFormatted:")] + NativeHandle Constructor(string formatted); // @property (readonly, copy, nonatomic) NSString * _Nonnull formatted; - [Export ("formatted")] + [Export("formatted")] string Formatted { get; } // @property (copy, nonatomic) NSString * _Nullable message; - [NullAllowed, Export ("message")] + [NullAllowed, Export("message")] string Message { get; set; } // @property (nonatomic, strong) NSArray * _Nullable params; - [NullAllowed, Export ("params", ArgumentSemantic.Strong)] + [NullAllowed, Export("params", ArgumentSemantic.Strong)] string[] Params { get; set; } } // @interface SentryNSError : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryNSError : SentrySerializable { // @property (copy, nonatomic) NSString * _Nonnull domain; - [Export ("domain")] + [Export("domain")] string Domain { get; set; } // @property (assign, nonatomic) NSInteger code; - [Export ("code")] + [Export("code")] nint Code { get; set; } // -(instancetype _Nonnull)initWithDomain:(NSString * _Nonnull)domain code:(NSInteger)code; - [Export ("initWithDomain:code:")] - NativeHandle Constructor (string domain, nint code); + [Export("initWithDomain:code:")] + NativeHandle Constructor(string domain, nint code); } // @interface SentryOptions : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryOptions { // @property (nonatomic, strong) NSString * _Nullable dsn; - [NullAllowed, Export ("dsn", ArgumentSemantic.Strong)] + [NullAllowed, Export("dsn", ArgumentSemantic.Strong)] string Dsn { get; set; } // @property (nonatomic, strong) SentryDsn * _Nullable parsedDsn; - [NullAllowed, Export ("parsedDsn", ArgumentSemantic.Strong)] + [NullAllowed, Export("parsedDsn", ArgumentSemantic.Strong)] SentryDsn ParsedDsn { get; set; } // @property (assign, nonatomic) BOOL debug; - [Export ("debug")] + [Export("debug")] bool Debug { get; set; } // @property (assign, nonatomic) SentryLevel diagnosticLevel; - [Export ("diagnosticLevel", ArgumentSemantic.Assign)] + [Export("diagnosticLevel", ArgumentSemantic.Assign)] SentryLevel DiagnosticLevel { get; set; } // @property (copy, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export ("releaseName")] + [NullAllowed, Export("releaseName")] string ReleaseName { get; set; } // @property (copy, nonatomic) NSString * _Nullable dist; - [NullAllowed, Export ("dist")] + [NullAllowed, Export("dist")] string Dist { get; set; } // @property (copy, nonatomic) NSString * _Nonnull environment; - [Export ("environment")] + [Export("environment")] string Environment { get; set; } // @property (assign, nonatomic) BOOL enabled; - [Export ("enabled")] + [Export("enabled")] bool Enabled { get; set; } // @property (assign, nonatomic) NSTimeInterval shutdownTimeInterval; - [Export ("shutdownTimeInterval")] + [Export("shutdownTimeInterval")] double ShutdownTimeInterval { get; set; } // @property (assign, nonatomic) BOOL enableCrashHandler; - [Export ("enableCrashHandler")] + [Export("enableCrashHandler")] bool EnableCrashHandler { get; set; } // @property (assign, nonatomic) BOOL enableSigtermReporting; - [Export ("enableSigtermReporting")] + [Export("enableSigtermReporting")] bool EnableSigtermReporting { get; set; } // @property (assign, nonatomic) NSUInteger maxBreadcrumbs; - [Export ("maxBreadcrumbs")] + [Export("maxBreadcrumbs")] nuint MaxBreadcrumbs { get; set; } // @property (assign, nonatomic) BOOL enableNetworkBreadcrumbs; - [Export ("enableNetworkBreadcrumbs")] + [Export("enableNetworkBreadcrumbs")] bool EnableNetworkBreadcrumbs { get; set; } // @property (assign, nonatomic) NSUInteger maxCacheItems; - [Export ("maxCacheItems")] + [Export("maxCacheItems")] nuint MaxCacheItems { get; set; } // @property (copy, nonatomic) SentryBeforeSendEventCallback _Nullable beforeSend; - [NullAllowed, Export ("beforeSend", ArgumentSemantic.Copy)] + [NullAllowed, Export("beforeSend", ArgumentSemantic.Copy)] SentryBeforeSendEventCallback BeforeSend { get; set; } // @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan; - [NullAllowed, Export ("beforeSendSpan", ArgumentSemantic.Copy)] + [NullAllowed, Export("beforeSendSpan", ArgumentSemantic.Copy)] SentryBeforeSendSpanCallback BeforeSendSpan { get; set; } // @property (copy, nonatomic) SentryBeforeSendLogCallback _Nullable beforeSendLog; - [NullAllowed, Export ("beforeSendLog", ArgumentSemantic.Copy)] + [NullAllowed, Export("beforeSendLog", ArgumentSemantic.Copy)] SentryBeforeSendLogCallback BeforeSendLog { get; set; } // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb; - [NullAllowed, Export ("beforeBreadcrumb", ArgumentSemantic.Copy)] + [NullAllowed, Export("beforeBreadcrumb", ArgumentSemantic.Copy)] SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get; set; } // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureScreenshot; - [NullAllowed, Export ("beforeCaptureScreenshot", ArgumentSemantic.Copy)] + [NullAllowed, Export("beforeCaptureScreenshot", ArgumentSemantic.Copy)] SentryBeforeCaptureScreenshotCallback BeforeCaptureScreenshot { get; set; } // @property (copy, nonatomic) SentryBeforeCaptureScreenshotCallback _Nullable beforeCaptureViewHierarchy; - [NullAllowed, Export ("beforeCaptureViewHierarchy", ArgumentSemantic.Copy)] + [NullAllowed, Export("beforeCaptureViewHierarchy", ArgumentSemantic.Copy)] SentryBeforeCaptureScreenshotCallback BeforeCaptureViewHierarchy { get; set; } // @property (copy, nonatomic) SentryOnCrashedLastRunCallback _Nullable onCrashedLastRun; - [NullAllowed, Export ("onCrashedLastRun", ArgumentSemantic.Copy)] + [NullAllowed, Export("onCrashedLastRun", ArgumentSemantic.Copy)] SentryOnCrashedLastRunCallback OnCrashedLastRun { get; set; } // @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)] + [Export("integrations", ArgumentSemantic.Copy)] string[] Integrations { get; set; } // +(NSArray * _Nonnull)defaultIntegrations; [Static] - [Export ("defaultIntegrations")] + [Export("defaultIntegrations")] string[] DefaultIntegrations { get; } // @property (copy, nonatomic) NSNumber * _Nullable sampleRate; - [NullAllowed, Export ("sampleRate", ArgumentSemantic.Copy)] + [NullAllowed, Export("sampleRate", ArgumentSemantic.Copy)] NSNumber SampleRate { get; set; } // @property (assign, nonatomic) BOOL enableAutoSessionTracking; - [Export ("enableAutoSessionTracking")] + [Export("enableAutoSessionTracking")] bool EnableAutoSessionTracking { get; set; } // @property (assign, nonatomic) BOOL enableGraphQLOperationTracking; - [Export ("enableGraphQLOperationTracking")] + [Export("enableGraphQLOperationTracking")] bool EnableGraphQLOperationTracking { get; set; } // @property (assign, nonatomic) BOOL enableWatchdogTerminationTracking; - [Export ("enableWatchdogTerminationTracking")] + [Export("enableWatchdogTerminationTracking")] bool EnableWatchdogTerminationTracking { get; set; } // @property (assign, nonatomic) NSUInteger sessionTrackingIntervalMillis; - [Export ("sessionTrackingIntervalMillis")] + [Export("sessionTrackingIntervalMillis")] nuint SessionTrackingIntervalMillis { get; set; } // @property (assign, nonatomic) BOOL attachStacktrace; - [Export ("attachStacktrace")] + [Export("attachStacktrace")] bool AttachStacktrace { get; set; } // @property (assign, nonatomic) NSUInteger maxAttachmentSize; - [Export ("maxAttachmentSize")] + [Export("maxAttachmentSize")] nuint MaxAttachmentSize { get; set; } // @property (assign, nonatomic) BOOL sendDefaultPii; - [Export ("sendDefaultPii")] + [Export("sendDefaultPii")] bool SendDefaultPii { get; set; } // @property (assign, nonatomic) BOOL enableAutoPerformanceTracing; - [Export ("enableAutoPerformanceTracing")] + [Export("enableAutoPerformanceTracing")] bool EnableAutoPerformanceTracing { get; set; } // @property (assign, nonatomic) BOOL enablePerformanceV2; - [Export ("enablePerformanceV2")] + [Export("enablePerformanceV2")] bool EnablePerformanceV2 { get; set; } // @property (assign, nonatomic) BOOL enablePersistingTracesWhenCrashing; - [Export ("enablePersistingTracesWhenCrashing")] + [Export("enablePersistingTracesWhenCrashing")] bool EnablePersistingTracesWhenCrashing { get; set; } // @property (nonatomic) SentryScope * _Nonnull (^ _Nonnull)(SentryScope * _Nonnull) initialScope; - [Export ("initialScope", ArgumentSemantic.Assign)] + [Export("initialScope", ArgumentSemantic.Assign)] Func InitialScope { get; set; } // @property (assign, nonatomic) BOOL enableUIViewControllerTracing; - [Export ("enableUIViewControllerTracing")] + [Export("enableUIViewControllerTracing")] bool EnableUIViewControllerTracing { get; set; } // @property (assign, nonatomic) BOOL attachScreenshot; - [Export ("attachScreenshot")] + [Export("attachScreenshot")] bool AttachScreenshot { get; set; } // @property (nonatomic, strong) SentryViewScreenshotOptions * _Nonnull screenshot; - [Export ("screenshot", ArgumentSemantic.Strong)] + [Export("screenshot", ArgumentSemantic.Strong)] SentryViewScreenshotOptions Screenshot { get; set; } // @property (assign, nonatomic) BOOL attachViewHierarchy; - [Export ("attachViewHierarchy")] + [Export("attachViewHierarchy")] bool AttachViewHierarchy { get; set; } // @property (assign, nonatomic) BOOL reportAccessibilityIdentifier; - [Export ("reportAccessibilityIdentifier")] + [Export("reportAccessibilityIdentifier")] bool ReportAccessibilityIdentifier { get; set; } // @property (assign, nonatomic) BOOL enableUserInteractionTracing; - [Export ("enableUserInteractionTracing")] + [Export("enableUserInteractionTracing")] bool EnableUserInteractionTracing { get; set; } // @property (assign, nonatomic) NSTimeInterval idleTimeout; - [Export ("idleTimeout")] + [Export("idleTimeout")] double IdleTimeout { get; set; } // @property (assign, nonatomic) BOOL enablePreWarmedAppStartTracing; - [Export ("enablePreWarmedAppStartTracing")] + [Export("enablePreWarmedAppStartTracing")] bool EnablePreWarmedAppStartTracing { get; set; } // @property (nonatomic, strong) SentryReplayOptions * _Nonnull sessionReplay; - [Export ("sessionReplay", ArgumentSemantic.Strong)] + [Export("sessionReplay", ArgumentSemantic.Strong)] SentryReplayOptions SessionReplay { get; set; } // @property (assign, nonatomic) BOOL enableNetworkTracking; - [Export ("enableNetworkTracking")] + [Export("enableNetworkTracking")] bool EnableNetworkTracking { get; set; } // @property (assign, nonatomic) BOOL enableFileIOTracing; - [Export ("enableFileIOTracing")] + [Export("enableFileIOTracing")] bool EnableFileIOTracing { get; set; } // @property (nonatomic) BOOL enableTracing __attribute__((deprecated("Use tracesSampleRate or tracesSampler instead"))); - [Export ("enableTracing")] + [Export("enableTracing")] bool EnableTracing { get; set; } // @property (nonatomic, strong) NSNumber * _Nullable tracesSampleRate; - [NullAllowed, Export ("tracesSampleRate", ArgumentSemantic.Strong)] + [NullAllowed, Export("tracesSampleRate", ArgumentSemantic.Strong)] NSNumber TracesSampleRate { get; set; } // @property (nonatomic) SentryTracesSamplerCallback _Nullable tracesSampler; - [NullAllowed, Export ("tracesSampler", ArgumentSemantic.Assign)] + [NullAllowed, Export("tracesSampler", ArgumentSemantic.Assign)] SentryTracesSamplerCallback TracesSampler { get; set; } // @property (readonly, assign, nonatomic) BOOL isTracingEnabled; - [Export ("isTracingEnabled")] + [Export("isTracingEnabled")] bool IsTracingEnabled { get; } // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppIncludes; - [Export ("inAppIncludes", ArgumentSemantic.Copy)] + [Export("inAppIncludes", ArgumentSemantic.Copy)] string[] InAppIncludes { get; } // -(void)addInAppInclude:(NSString * _Nonnull)inAppInclude; - [Export ("addInAppInclude:")] - void AddInAppInclude (string inAppInclude); + [Export("addInAppInclude:")] + void AddInAppInclude(string inAppInclude); // @property (readonly, copy, nonatomic) NSArray * _Nonnull inAppExcludes; - [Export ("inAppExcludes", ArgumentSemantic.Copy)] + [Export("inAppExcludes", ArgumentSemantic.Copy)] string[] InAppExcludes { get; } // -(void)addInAppExclude:(NSString * _Nonnull)inAppExclude; - [Export ("addInAppExclude:")] - void AddInAppExclude (string inAppExclude); + [Export("addInAppExclude:")] + void AddInAppExclude(string inAppExclude); - [Wrap ("WeakUrlSessionDelegate")] + [Wrap("WeakUrlSessionDelegate")] [NullAllowed] NSUrlSessionDelegate UrlSessionDelegate { get; set; } // @property (nonatomic, weak) id _Nullable urlSessionDelegate; - [NullAllowed, Export ("urlSessionDelegate", ArgumentSemantic.Weak)] + [NullAllowed, Export("urlSessionDelegate", ArgumentSemantic.Weak)] NSObject WeakUrlSessionDelegate { get; set; } // @property (nonatomic, strong) NSURLSession * _Nullable urlSession; - [NullAllowed, Export ("urlSession", ArgumentSemantic.Strong)] + [NullAllowed, Export("urlSession", ArgumentSemantic.Strong)] NSUrlSession UrlSession { get; set; } // @property (assign, nonatomic) BOOL enableSwizzling; - [Export ("enableSwizzling")] + [Export("enableSwizzling")] bool EnableSwizzling { get; set; } // @property (nonatomic, strong) NSSet * _Nonnull swizzleClassNameExcludes; - [Export ("swizzleClassNameExcludes", ArgumentSemantic.Strong)] + [Export("swizzleClassNameExcludes", ArgumentSemantic.Strong)] NSSet SwizzleClassNameExcludes { get; set; } // @property (assign, nonatomic) BOOL enableCoreDataTracing; - [Export ("enableCoreDataTracing")] + [Export("enableCoreDataTracing")] bool EnableCoreDataTracing { get; set; } // @property (copy, nonatomic) SentryProfilingConfigurationBlock _Nullable configureProfiling; - [NullAllowed, Export ("configureProfiling", ArgumentSemantic.Copy)] + [NullAllowed, Export("configureProfiling", ArgumentSemantic.Copy)] SentryProfilingConfigurationBlock ConfigureProfiling { get; set; } // @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")] + [Export("enableAppLaunchProfiling")] bool EnableAppLaunchProfiling { get; set; } // @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)] + [Export("profilesSampleRate", ArgumentSemantic.Strong)] NSNumber ProfilesSampleRate { get; set; } // @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)] + [Export("profilesSampler", ArgumentSemantic.Assign)] SentryTracesSamplerCallback ProfilesSampler { get; set; } // @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")] + [Export("isProfilingEnabled")] bool IsProfilingEnabled { 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")] + [Export("enableProfiling")] bool EnableProfiling { get; set; } // @property (assign, nonatomic) BOOL sendClientReports; - [Export ("sendClientReports")] + [Export("sendClientReports")] bool SendClientReports { get; set; } // @property (assign, nonatomic) BOOL enableAppHangTracking; - [Export ("enableAppHangTracking")] + [Export("enableAppHangTracking")] bool EnableAppHangTracking { get; set; } // @property (assign, nonatomic) BOOL enableAppHangTrackingV2; - [Export ("enableAppHangTrackingV2")] + [Export("enableAppHangTrackingV2")] bool EnableAppHangTrackingV2 { get; set; } // @property (assign, nonatomic) BOOL enableReportNonFullyBlockingAppHangs; - [Export ("enableReportNonFullyBlockingAppHangs")] + [Export("enableReportNonFullyBlockingAppHangs")] bool EnableReportNonFullyBlockingAppHangs { get; set; } // @property (assign, nonatomic) NSTimeInterval appHangTimeoutInterval; - [Export ("appHangTimeoutInterval")] + [Export("appHangTimeoutInterval")] double AppHangTimeoutInterval { get; set; } // @property (assign, nonatomic) BOOL enableAutoBreadcrumbTracking; - [Export ("enableAutoBreadcrumbTracking")] + [Export("enableAutoBreadcrumbTracking")] bool EnableAutoBreadcrumbTracking { get; set; } // @property (retain, nonatomic) NSArray * _Nonnull tracePropagationTargets; - [Export ("tracePropagationTargets", ArgumentSemantic.Retain)] NSObject[] TracePropagationTargets { get; set; } + [Export("tracePropagationTargets", ArgumentSemantic.Retain)] + NSObject[] TracePropagationTargets { get; set; } // @property (assign, nonatomic) BOOL enableCaptureFailedRequests; - [Export ("enableCaptureFailedRequests")] + [Export("enableCaptureFailedRequests")] bool EnableCaptureFailedRequests { get; set; } // @property (nonatomic, strong) NSArray * _Nonnull failedRequestStatusCodes; - [Export ("failedRequestStatusCodes", ArgumentSemantic.Strong)] + [Export("failedRequestStatusCodes", ArgumentSemantic.Strong)] SentryHttpStatusCodeRange[] FailedRequestStatusCodes { get; set; } // @property (nonatomic, strong) NSArray * _Nonnull failedRequestTargets; - [Export ("failedRequestTargets", ArgumentSemantic.Strong)] NSObject[] FailedRequestTargets { get; set; } + [Export("failedRequestTargets", ArgumentSemantic.Strong)] + NSObject[] FailedRequestTargets { get; set; } // @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, Introduced (PlatformName.MacCatalyst, 15, 0), Introduced (PlatformName.MacOSX, 12, 0), Introduced (PlatformName.iOS, 15, 0)] - [Export ("enableMetricKit")] + [NoWatch, NoTV, MacCatalyst(15, 0)] + [Export("enableMetricKit")] bool EnableMetricKit { get; set; } + // @property (assign, nonatomic) BOOL enableMetricKitRawPayload __attribute__((availability(ios, introduced=15.0))) __attribute__((availability(macos, introduced=12.0))) __attribute__((availability(maccatalyst, introduced=15.0))) __attribute__((availability(tvos, unavailable))) __attribute__((availability(watchos, unavailable))); + [NoWatch, NoTV, MacCatalyst(15, 0)] + [Export("enableMetricKitRawPayload")] + bool EnableMetricKitRawPayload { get; set; } + // @property (nonatomic) BOOL enableTimeToFullDisplayTracing; - [Export ("enableTimeToFullDisplayTracing")] + [Export("enableTimeToFullDisplayTracing")] bool EnableTimeToFullDisplayTracing { get; set; } // @property (assign, nonatomic) BOOL swiftAsyncStacktraces; - [Export ("swiftAsyncStacktraces")] + [Export("swiftAsyncStacktraces")] bool SwiftAsyncStacktraces { get; set; } // @property (copy, nonatomic) NSString * _Nonnull cacheDirectoryPath; - [Export ("cacheDirectoryPath")] + [Export("cacheDirectoryPath")] string CacheDirectoryPath { get; set; } // @property (assign, nonatomic) BOOL enableSpotlight; - [Export ("enableSpotlight")] + [Export("enableSpotlight")] bool EnableSpotlight { get; set; } // @property (copy, nonatomic) NSString * _Nonnull spotlightUrl; - [Export ("spotlightUrl")] + [Export("spotlightUrl")] string SpotlightUrl { get; set; } // @property (readonly, nonatomic) NSObject * _Nonnull _swiftExperimentalOptions; - [Export ("_swiftExperimentalOptions")] + [Export("_swiftExperimentalOptions")] NSObject _swiftExperimentalOptions { get; } - - // @property (copy, nonatomic) API_AVAILABLE(ios(13.0)) SentryUserFeedbackConfigurationBlock configureUserFeedback __attribute__((availability(ios, introduced=13.0))) __attribute__((availability(macos_app_extension, unavailable))) __attribute__((availability(ios_app_extension, unavailable))); - [Export ("configureUserFeedback", ArgumentSemantic.Copy)] - SentryUserFeedbackConfigurationBlock ConfigureUserFeedback { get; set; } } // typedef void (^SentryProfilingConfigurationBlock)(SentryProfileOptions * _Nonnull); [Internal] -delegate void SentryProfilingConfigurationBlock (SentryProfileOptions arg0); +delegate void SentryProfilingConfigurationBlock(SentryProfileOptions options); // @interface SentryReplayApi : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryReplayApi { // -(void)maskView:(UIView * _Nonnull)view __attribute__((swift_name("maskView(_:)"))); - [Export ("maskView:")] - void MaskView (UIView view); + [Export("maskView:")] + void MaskView(UIView view); // -(void)unmaskView:(UIView * _Nonnull)view __attribute__((swift_name("unmaskView(_:)"))); - [Export ("unmaskView:")] - void UnmaskView (UIView view); + [Export("unmaskView:")] + void UnmaskView(UIView view); // -(void)pause; - [Export ("pause")] - void Pause (); + [Export("pause")] + void Pause(); // -(void)resume; - [Export ("resume")] - void Resume (); + [Export("resume")] + void Resume(); // -(void)start; - [Export ("start")] - void Start (); + [Export("start")] + void Start(); // -(void)stop; - [Export ("stop")] - void Stop (); + [Export("stop")] + void Stop(); // -(void)showMaskPreview; - [Export ("showMaskPreview")] - void ShowMaskPreview (); + [Export("showMaskPreview")] + void ShowMaskPreview(); // -(void)showMaskPreview:(CGFloat)opacity; - [Export ("showMaskPreview:")] - void ShowMaskPreview (nfloat opacity); + [Export("showMaskPreview:")] + void ShowMaskPreview(nfloat opacity); // -(void)hideMaskPreview; - [Export ("hideMaskPreview")] - void HideMaskPreview (); + [Export("hideMaskPreview")] + void HideMaskPreview(); } // @interface SentryRequest : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryRequest : SentrySerializable { // @property (copy, nonatomic) NSNumber * _Nullable bodySize; - [NullAllowed, Export ("bodySize", ArgumentSemantic.Copy)] + [NullAllowed, Export("bodySize", ArgumentSemantic.Copy)] NSNumber BodySize { get; set; } // @property (copy, nonatomic) NSString * _Nullable cookies; - [NullAllowed, Export ("cookies")] + [NullAllowed, Export("cookies")] string Cookies { get; set; } // @property (nonatomic, strong) NSDictionary * _Nullable headers; - [NullAllowed, Export ("headers", ArgumentSemantic.Strong)] + [NullAllowed, Export("headers", ArgumentSemantic.Strong)] NSDictionary Headers { get; set; } // @property (copy, nonatomic) NSString * _Nullable fragment; - [NullAllowed, Export ("fragment")] + [NullAllowed, Export("fragment")] string Fragment { get; set; } // @property (copy, nonatomic) NSString * _Nullable method; - [NullAllowed, Export ("method")] + [NullAllowed, Export("method")] string Method { get; set; } // @property (copy, nonatomic) NSString * _Nullable queryString; - [NullAllowed, Export ("queryString")] + [NullAllowed, Export("queryString")] string QueryString { get; set; } // @property (copy, nonatomic) NSString * _Nullable url; - [NullAllowed, Export ("url")] + [NullAllowed, Export("url")] string Url { get; set; } } // @interface SentrySamplingContext : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentrySamplingContext { // @property (readonly, nonatomic) SentryTransactionContext * _Nonnull transactionContext; - [Export ("transactionContext")] + [Export("transactionContext")] SentryTransactionContext TransactionContext { get; } // @property (readonly, nonatomic) NSDictionary * _Nullable customSamplingContext; - [NullAllowed, Export ("customSamplingContext")] + [NullAllowed, Export("customSamplingContext")] NSDictionary CustomSamplingContext { get; } // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext; - [Export ("initWithTransactionContext:")] - NativeHandle Constructor (SentryTransactionContext transactionContext); + [Export("initWithTransactionContext:")] + NativeHandle Constructor(SentryTransactionContext transactionContext); // -(instancetype _Nonnull)initWithTransactionContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; - [Export ("initWithTransactionContext:customSamplingContext:")] - NativeHandle Constructor (SentryTransactionContext transactionContext, NSDictionary customSamplingContext); + [Export("initWithTransactionContext:customSamplingContext:")] + NativeHandle Constructor(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); } // @interface SentryScope : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] partial interface SentryScope : SentrySerializable { // @property (nonatomic, strong) id _Nullable span; - [NullAllowed, Export ("span", ArgumentSemantic.Strong)] + [NullAllowed, Export("span", ArgumentSemantic.Strong)] SentrySpan Span { get; set; } // @property (nonatomic, strong) NSString * _Nullable replayId; - [NullAllowed, Export ("replayId", ArgumentSemantic.Strong)] + [NullAllowed, Export("replayId", ArgumentSemantic.Strong)] string ReplayId { get; set; } // @property (readonly, copy, nonatomic) NSDictionary * _Nonnull tags; - [Export ("tags", ArgumentSemantic.Copy)] + [Export("tags", ArgumentSemantic.Copy)] NSDictionary Tags { get; } // -(instancetype _Nonnull)initWithMaxBreadcrumbs:(NSInteger)maxBreadcrumbs __attribute__((objc_designated_initializer)); - [Export ("initWithMaxBreadcrumbs:")] + [Export("initWithMaxBreadcrumbs:")] [DesignatedInitializer] - NativeHandle Constructor (nint maxBreadcrumbs); + NativeHandle Constructor(nint maxBreadcrumbs); // -(instancetype _Nonnull)initWithScope:(SentryScope * _Nonnull)scope; - [Export ("initWithScope:")] - NativeHandle Constructor (SentryScope scope); + [Export("initWithScope:")] + NativeHandle Constructor(SentryScope scope); // -(void)setUser:(SentryUser * _Nullable)user; - [Export ("setUser:")] - void SetUser ([NullAllowed] SentryUser 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); + [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); + [Export("removeTagForKey:")] + void RemoveTagForKey(string key); // -(void)setTags:(NSDictionary * _Nullable)tags; - [Export ("setTags:")] - void SetTags ([NullAllowed] NSDictionary tags); + [Export("setTags:")] + void SetTags([NullAllowed] NSDictionary tags); // -(void)setExtras:(NSDictionary * _Nullable)extras; - [Export ("setExtras:")] - void SetExtras ([NullAllowed] NSDictionary 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); + [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); + [Export("removeExtraForKey:")] + void RemoveExtraForKey(string key); // -(void)setDist:(NSString * _Nullable)dist; - [Export ("setDist:")] - void SetDist ([NullAllowed] string dist); + [Export("setDist:")] + void SetDist([NullAllowed] string dist); // -(void)setEnvironment:(NSString * _Nullable)environment; - [Export ("setEnvironment:")] - void SetEnvironment ([NullAllowed] string environment); + [Export("setEnvironment:")] + void SetEnvironment([NullAllowed] string environment); // -(void)setFingerprint:(NSArray * _Nullable)fingerprint; - [Export ("setFingerprint:")] - void SetFingerprint ([NullAllowed] string[] fingerprint); + [Export("setFingerprint:")] + void SetFingerprint([NullAllowed] string[] fingerprint); // -(void)setLevel:(enum SentryLevel)level; - [Export ("setLevel:")] - void SetLevel (SentryLevel level); + [Export("setLevel:")] + void SetLevel(SentryLevel level); // -(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb __attribute__((swift_name("addBreadcrumb(_:)"))); - [Export ("addBreadcrumb:")] - void AddBreadcrumb (SentryBreadcrumb crumb); + [Export("addBreadcrumb:")] + void AddBreadcrumb(SentryBreadcrumb crumb); // -(void)add:(SentryBreadcrumb * _Nonnull)crumb __attribute__((deprecated("use `addBreadcrumb` instead"))) __attribute__((swift_name("add(_:)"))); - [Export ("add:")] - void Add (SentryBreadcrumb crumb); + [Export("add:")] + void Add(SentryBreadcrumb crumb); // -(void)clearBreadcrumbs; - [Export ("clearBreadcrumbs")] - void ClearBreadcrumbs (); + [Export("clearBreadcrumbs")] + void ClearBreadcrumbs(); // -(NSDictionary * _Nonnull)serialize; - [Export ("serialize")] + [Export("serialize")] NSDictionary Serialize(); // -(void)setContextValue:(NSDictionary * _Nonnull)value forKey:(NSString * _Nonnull)key __attribute__((swift_name("setContext(value:key:)"))); - [Export ("setContextValue:forKey:")] - void SetContextValue (NSDictionary value, string key); + [Export("setContextValue:forKey:")] + void SetContextValue(NSDictionary value, string key); // -(void)removeContextForKey:(NSString * _Nonnull)key __attribute__((swift_name("removeContext(key:)"))); - [Export ("removeContextForKey:")] - void RemoveContextForKey (string key); + [Export("removeContextForKey:")] + void RemoveContextForKey(string key); // -(void)addAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((swift_name("addAttachment(_:)"))); - [Export ("addAttachment:")] - void AddAttachment (SentryAttachment attachment); + [Export("addAttachment:")] + void AddAttachment(SentryAttachment attachment); // -(void)includeAttachment:(SentryAttachment * _Nonnull)attachment __attribute__((deprecated("use `addAttachment` instead"))) __attribute__((swift_name("add(_:)"))); - [Export ("includeAttachment:")] - void IncludeAttachment (SentryAttachment attachment); + [Export("includeAttachment:")] + void IncludeAttachment(SentryAttachment attachment); // -(void)clearAttachments; - [Export ("clearAttachments")] - void ClearAttachments (); + [Export("clearAttachments")] + void ClearAttachments(); // -(void)clear; - [Export ("clear")] - void Clear (); + [Export("clear")] + void Clear(); // -(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); + [Export("useSpan:")] + void UseSpan(SentrySpanCallback callback); } // @interface SentrySpanId : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentrySpanId { // -(instancetype _Nonnull)initWithUUID:(NSUUID * _Nonnull)uuid; - [Export ("initWithUUID:")] - NativeHandle Constructor (NSUuid uuid); + [Export("initWithUUID:")] + NativeHandle Constructor(NSUuid uuid); // -(instancetype _Nonnull)initWithValue:(NSString * _Nonnull)value; - [Export ("initWithValue:")] - NativeHandle Constructor (string value); + [Export("initWithValue:")] + NativeHandle Constructor(string value); // @property (readonly, copy) NSString * _Nonnull sentrySpanIdString; - [Export ("sentrySpanIdString")] + [Export("sentrySpanIdString")] string SentrySpanIdString { get; } // @property (readonly, nonatomic, strong, class) SentrySpanId * _Nonnull empty; [Static] - [Export ("empty", ArgumentSemantic.Strong)] + [Export("empty", ArgumentSemantic.Strong)] SentrySpanId Empty { get; } } // @interface SentryStacktrace : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryStacktrace : SentrySerializable { // @property (nonatomic, strong) NSArray * _Nonnull frames; - [Export ("frames", ArgumentSemantic.Strong)] + [Export("frames", ArgumentSemantic.Strong)] SentryFrame[] Frames { get; set; } // @property (nonatomic, strong) NSDictionary * _Nonnull registers; - [Export ("registers", ArgumentSemantic.Strong)] + [Export("registers", ArgumentSemantic.Strong)] NSDictionary Registers { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable snapshot; - [NullAllowed, Export ("snapshot", ArgumentSemantic.Copy)] + [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); + [Export("initWithFrames:registers:")] + NativeHandle Constructor(SentryFrame[] frames, NSDictionary registers); // -(void)fixDuplicateFrames; - [Export ("fixDuplicateFrames")] - void FixDuplicateFrames (); + [Export("fixDuplicateFrames")] + void FixDuplicateFrames(); } // @interface SentryThread : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryThread : SentrySerializable { // @property (copy, nonatomic) NSNumber * _Nonnull threadId; - [Export ("threadId", ArgumentSemantic.Copy)] + [Export("threadId", ArgumentSemantic.Copy)] NSNumber ThreadId { get; set; } // @property (copy, nonatomic) NSString * _Nullable name; - [NullAllowed, Export ("name")] + [NullAllowed, Export("name")] string Name { get; set; } // @property (nonatomic, strong) SentryStacktrace * _Nullable stacktrace; - [NullAllowed, Export ("stacktrace", ArgumentSemantic.Strong)] + [NullAllowed, Export("stacktrace", ArgumentSemantic.Strong)] SentryStacktrace Stacktrace { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable crashed; - [NullAllowed, Export ("crashed", ArgumentSemantic.Copy)] + [NullAllowed, Export("crashed", ArgumentSemantic.Copy)] NSNumber Crashed { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable current; - [NullAllowed, Export ("current", ArgumentSemantic.Copy)] + [NullAllowed, Export("current", ArgumentSemantic.Copy)] NSNumber Current { get; set; } // @property (copy, nonatomic) NSNumber * _Nullable isMain; - [NullAllowed, Export ("isMain", ArgumentSemantic.Copy)] + [NullAllowed, Export("isMain", ArgumentSemantic.Copy)] NSNumber IsMain { get; set; } // -(instancetype _Nonnull)initWithThreadId:(NSNumber * _Nonnull)threadId; - [Export ("initWithThreadId:")] - NativeHandle Constructor (NSNumber threadId); + [Export("initWithThreadId:")] + NativeHandle Constructor(NSNumber threadId); } // @interface SentryTraceContext : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryTraceContext : SentrySerializable { // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export ("traceId")] + [Export("traceId")] SentryId TraceId { get; } // @property (readonly, nonatomic) NSString * _Nonnull publicKey; - [Export ("publicKey")] + [Export("publicKey")] string PublicKey { get; } // @property (readonly, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export ("releaseName")] + [NullAllowed, Export("releaseName")] string ReleaseName { get; } // @property (readonly, nonatomic) NSString * _Nullable environment; - [NullAllowed, Export ("environment")] + [NullAllowed, Export("environment")] string Environment { get; } // @property (readonly, nonatomic) NSString * _Nullable transaction; - [NullAllowed, Export ("transaction")] + [NullAllowed, Export("transaction")] string Transaction { get; } // @property (readonly, nonatomic) NSString * _Nullable userSegment; - [NullAllowed, Export ("userSegment")] + [NullAllowed, Export("userSegment")] string UserSegment { get; } // @property (readonly, nonatomic) NSString * _Nullable sampleRate; - [NullAllowed, Export ("sampleRate")] + [NullAllowed, Export("sampleRate")] string SampleRate { get; } // @property (readonly, nonatomic) NSString * _Nullable sampleRand; - [NullAllowed, Export ("sampleRand")] + [NullAllowed, Export("sampleRand")] string SampleRand { get; } // @property (readonly, nonatomic) NSString * _Nullable sampled; - [NullAllowed, Export ("sampled")] + [NullAllowed, Export("sampled")] string Sampled { get; } // @property (readonly, nonatomic) NSString * _Nullable replayId; - [NullAllowed, Export ("replayId")] + [NullAllowed, Export("replayId")] string ReplayId { get; } // -(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); + [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 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); + [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 _Nullable)initWithScope:(SentryScope * _Nonnull)scope options:(SentryOptions * _Nonnull)options; - [Export ("initWithScope:options:")] - NativeHandle Constructor (SentryScope scope, SentryOptions options); + [Export("initWithScope:options:")] + NativeHandle Constructor(SentryScope scope, SentryOptions options); // -(instancetype _Nullable)initWithDict:(NSDictionary * _Nonnull)dictionary; - [Export ("initWithDict:")] - NativeHandle Constructor (NSDictionary dictionary); + [Export("initWithDict:")] + NativeHandle Constructor(NSDictionary dictionary); // -(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); + [Export("initWithTracer:scope:options:")] + NativeHandle Constructor(SentryTracer tracer, [NullAllowed] SentryScope scope, SentryOptions options); // -(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); + [Export("initWithTraceId:options:userSegment:replayId:")] + NativeHandle Constructor(SentryId traceId, SentryOptions options, [NullAllowed] string userSegment, [NullAllowed] string replayId); // -(SentryBaggage * _Nonnull)toBaggage; - [Export ("toBaggage")] + [Export("toBaggage")] SentryBaggage ToBaggage(); } // @interface SentryTraceHeader : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [DisableDefaultCtor] [Internal] interface SentryTraceHeader { // @property (readonly, nonatomic) SentryId * _Nonnull traceId; - [Export ("traceId")] + [Export("traceId")] SentryId TraceId { get; } // @property (readonly, nonatomic) SentrySpanId * _Nonnull spanId; - [Export ("spanId")] + [Export("spanId")] SentrySpanId SpanId { get; } // @property (readonly, nonatomic) SentrySampleDecision sampled; - [Export ("sampled")] + [Export("sampled")] SentrySampleDecision Sampled { get; } // -(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); + [Export("initWithTraceId:spanId:sampled:")] + NativeHandle Constructor(SentryId traceId, SentrySpanId spanId, SentrySampleDecision sampled); // -(NSString * _Nonnull)value; - [Export ("value")] + [Export("value")] string Value { get; } } // @interface SentryTransactionContext : SentrySpanContext -[BaseType (typeof(SentrySpanContext))] +[BaseType(typeof(SentrySpanContext))] [DisableDefaultCtor] [Internal] interface SentryTransactionContext { // @property (readonly, nonatomic) NSString * _Nonnull name; - [Export ("name")] + [Export("name")] string Name { get; } // @property (readonly, nonatomic) SentryTransactionNameSource nameSource; - [Export ("nameSource")] + [Export("nameSource")] SentryTransactionNameSource NameSource { get; } // @property (nonatomic, strong) NSNumber * _Nullable sampleRate; - [NullAllowed, Export ("sampleRate", ArgumentSemantic.Strong)] + [NullAllowed, Export("sampleRate", ArgumentSemantic.Strong)] NSNumber SampleRate { get; set; } // @property (nonatomic, strong) NSNumber * _Nullable sampleRand; - [NullAllowed, Export ("sampleRand", ArgumentSemantic.Strong)] + [NullAllowed, Export("sampleRand", ArgumentSemantic.Strong)] NSNumber SampleRand { get; set; } // @property (nonatomic) SentrySampleDecision parentSampled; - [Export ("parentSampled", ArgumentSemantic.Assign)] + [Export("parentSampled", ArgumentSemantic.Assign)] SentrySampleDecision ParentSampled { get; set; } // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRate; - [NullAllowed, Export ("parentSampleRate", ArgumentSemantic.Strong)] + [NullAllowed, Export("parentSampleRate", ArgumentSemantic.Strong)] NSNumber ParentSampleRate { get; set; } // @property (nonatomic, strong) NSNumber * _Nullable parentSampleRand; - [NullAllowed, Export ("parentSampleRand", ArgumentSemantic.Strong)] + [NullAllowed, Export("parentSampleRand", ArgumentSemantic.Strong)] NSNumber ParentSampleRand { get; set; } // @property (assign, nonatomic) BOOL forNextAppLaunch; - [Export ("forNextAppLaunch")] + [Export("forNextAppLaunch")] bool ForNextAppLaunch { get; set; } // -(instancetype _Nonnull)initWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; - [Export ("initWithName:operation:")] - NativeHandle Constructor (string name, string operation); + [Export("initWithName:operation:")] + NativeHandle Constructor(string name, string operation); // -(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); + [Export("initWithName:operation:sampled:")] + NativeHandle Constructor(string name, string operation, SentrySampleDecision sampled); // -(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); + [Export("initWithName:operation:sampled:sampleRate:sampleRand:")] + NativeHandle Constructor(string name, string operation, SentrySampleDecision sampled, [NullAllowed] NSNumber sampleRate, [NullAllowed] NSNumber sampleRand); // -(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); + [Export("initWithName:operation:traceId:spanId:parentSpanId:parentSampled:")] + NativeHandle Constructor(string name, string operation, SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentSpanId, SentrySampleDecision parentSampled); // -(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); + [Export("initWithName:operation:traceId:spanId:parentSpanId:parentSampled:parentSampleRate:parentSampleRand:")] + NativeHandle Constructor(string name, string operation, SentryId traceId, SentrySpanId spanId, [NullAllowed] SentrySpanId parentSpanId, SentrySampleDecision parentSampled, [NullAllowed] NSNumber parentSampleRate, [NullAllowed] NSNumber parentSampleRand); } // @interface SentryUser : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface SentryUser : SentrySerializable { // @property (copy, atomic) NSString * _Nullable userId; - [NullAllowed, Export ("userId")] + [NullAllowed, Export("userId")] string UserId { get; set; } // @property (copy, atomic) NSString * _Nullable email; - [NullAllowed, Export ("email")] + [NullAllowed, Export("email")] string Email { get; set; } // @property (copy, atomic) NSString * _Nullable username; - [NullAllowed, Export ("username")] + [NullAllowed, Export("username")] string Username { get; set; } // @property (copy, atomic) NSString * _Nullable ipAddress; - [NullAllowed, Export ("ipAddress")] + [NullAllowed, Export("ipAddress")] string IpAddress { get; set; } // @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")] + [Export("segment")] string Segment { get; set; } // @property (copy, atomic) NSString * _Nullable name; - [NullAllowed, Export ("name")] + [NullAllowed, Export("name")] string Name { get; set; } // @property (nonatomic, strong) SentryGeo * _Nullable geo; - [NullAllowed, Export ("geo", ArgumentSemantic.Strong)] + [NullAllowed, Export("geo", ArgumentSemantic.Strong)] SentryGeo Geo { get; set; } // @property (atomic, strong) NSDictionary * _Nullable data; - [NullAllowed, Export ("data", ArgumentSemantic.Strong)] + [NullAllowed, Export("data", ArgumentSemantic.Strong)] NSDictionary Data { get; set; } // -(instancetype _Nonnull)initWithUserId:(NSString * _Nonnull)userId; - [Export ("initWithUserId:")] - NativeHandle Constructor (string userId); + [Export("initWithUserId:")] + NativeHandle Constructor(string userId); // -(BOOL)isEqualToUser:(SentryUser * _Nonnull)user; - [Export ("isEqualToUser:")] - bool IsEqualToUser (SentryUser user); + [Export("isEqualToUser:")] + bool IsEqualToUser(SentryUser user); // -(NSUInteger)hash; - [Export ("hash")] + [Export("hash")] nuint Hash { get; } } -// @interface SentryScreenFrames : NSObject +// @interface SentryFeedback : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry14SentryFeedback")] +[DisableDefaultCtor] +[Internal] +interface SentryFeedback +{ + // @property (readonly, nonatomic, strong) SentryId * _Nonnull eventId; + [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)); + [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); +} + +// @interface SentryId : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry8SentryId")] +[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); + + // @property (readonly, nonatomic) NSUInteger hash; + [Export("hash")] + nuint Hash { get; } +} + +// @interface SentryLog : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry9SentryLog")] +[DisableDefaultCtor] +[Internal] +interface SentryLog +{ + // @property (copy, nonatomic) NSDate * _Nonnull timestamp; + [Export("timestamp", ArgumentSemantic.Copy)] + NSDate Timestamp { get; set; } + + // @property (nonatomic, strong) SentryId * _Nonnull traceId; + [Export("traceId", ArgumentSemantic.Strong)] + SentryId TraceId { get; set; } + + // @property (nonatomic) enum SentryStructuredLogLevel level; + [Export("level", ArgumentSemantic.Assign)] + SentryStructuredLogLevel Level { get; set; } + + // @property (copy, nonatomic) NSString * _Nonnull body; + [Export("body")] + string Body { get; set; } + + // @property (nonatomic, strong) NSNumber * _Nullable severityNumber; + [NullAllowed, Export("severityNumber", ArgumentSemantic.Strong)] + NSNumber SeverityNumber { get; set; } +} + +// @interface SentryLogger : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry12SentryLogger")] +[DisableDefaultCtor] +[Internal] +interface SentryLogger +{ + // -(void)trace:(NSString * _Nonnull)body; + [Export("trace:")] + void Trace(string body); + + // -(void)trace:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("trace:attributes:")] + void Trace(string body, NSDictionary attributes); + + // -(void)debug:(NSString * _Nonnull)body; + [Export("debug:")] + void Debug(string body); + + // -(void)debug:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("debug:attributes:")] + void Debug(string body, NSDictionary attributes); + + // -(void)info:(NSString * _Nonnull)body; + [Export("info:")] + void Info(string body); + + // -(void)info:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("info:attributes:")] + void Info(string body, NSDictionary attributes); + + // -(void)warn:(NSString * _Nonnull)body; + [Export("warn:")] + void Warn(string body); + + // -(void)warn:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("warn:attributes:")] + void Warn(string body, NSDictionary attributes); + + // -(void)error:(NSString * _Nonnull)body; + [Export("error:")] + void Error(string body); + + // -(void)error:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("error:attributes:")] + void Error(string body, NSDictionary attributes); + + // -(void)fatal:(NSString * _Nonnull)body; + [Export("fatal:")] + void Fatal(string body); + + // -(void)fatal:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; + [Export("fatal:attributes:")] + void Fatal(string body, NSDictionary attributes); +} + +// @interface SentryProfileOptions : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry20SentryProfileOptions")] +[Internal] +interface SentryProfileOptions +{ + // @property (nonatomic) enum SentryProfileLifecycle lifecycle; + [Export("lifecycle", ArgumentSemantic.Assign)] + SentryProfileLifecycle Lifecycle { get; set; } + + // @property (nonatomic) float sessionSampleRate; + [Export("sessionSampleRate")] + float SessionSampleRate { get; set; } + + // @property (nonatomic) BOOL profileAppStarts; + [Export("profileAppStarts")] + bool ProfileAppStarts { get; set; } +} + +// @protocol SentryRRWebEvent +[Protocol] +[Internal] +interface ISentryRRWebEvent : SentrySerializable +{ +} + +// @interface SentryRRWebEvent : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry16SentryRRWebEvent")] +[DisableDefaultCtor] +[Internal] +interface SentryRRWebEvent : ISentryRRWebEvent +{ + // @property (readonly, copy, nonatomic) NSDictionary * _Nullable data; + [NullAllowed, Export("data", ArgumentSemantic.Copy)] + NSDictionary Data { get; } + + // -(NSDictionary * _Nonnull)serialize __attribute__((warn_unused_result(""))); + [Export("serialize")] + NSDictionary Serialize(); +} + +// @protocol SentryRedactOptions +[Protocol(Name = "_TtP6Sentry19SentryRedactOptions_")] +[Internal] +[Model] [BaseType (typeof(NSObject))] +interface SentryRedactOptions +{ + // @required @property (readonly, nonatomic) BOOL maskAllText; + [Abstract] + [Export("maskAllText")] + bool MaskAllText { get; } + + // @required @property (readonly, nonatomic) BOOL maskAllImages; + [Abstract] + [Export("maskAllImages")] + bool MaskAllImages { get; } + + // @required @property (readonly, copy, nonatomic) NSArray * _Nonnull maskedViewClasses; + [Abstract] + [Export("maskedViewClasses", ArgumentSemantic.Copy)] + Class[] MaskedViewClasses { get; } + + // @required @property (readonly, copy, nonatomic) NSArray * _Nonnull unmaskedViewClasses; + [Abstract] + [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] + Class[] UnmaskedViewClasses { get; } +} + +// @protocol SentryReplayBreadcrumbConverter +[Protocol(Name = "_TtP6Sentry31SentryReplayBreadcrumbConverter_")] +[BaseType(typeof(NSObject), Name = "_TtP6Sentry31SentryReplayBreadcrumbConverter_")] +[Internal] +interface SentryReplayBreadcrumbConverter +{ + // @required -(id _Nullable)convertFrom:(SentryBreadcrumb * _Nonnull)breadcrumb __attribute__((warn_unused_result(""))); + [Abstract] + [Export("convertFrom:")] + [return: NullAllowed] + SentryRRWebEvent ConvertFrom(SentryBreadcrumb breadcrumb); +} + +// @interface SentryReplayOptions : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry19SentryReplayOptions")] +[Internal] +interface SentryReplayOptions : SentryRedactOptions +{ + // @property (nonatomic) float sessionSampleRate; + [Export("sessionSampleRate")] + float SessionSampleRate { get; set; } + + // @property (nonatomic) float onErrorSampleRate; + [Export("onErrorSampleRate")] + float OnErrorSampleRate { get; set; } + + // @property (nonatomic) BOOL maskAllText; + [Export("maskAllText")] + bool MaskAllText { get; set; } + + // @property (nonatomic) BOOL maskAllImages; + [Export("maskAllImages")] + bool MaskAllImages { get; set; } + + // @property (nonatomic) enum SentryReplayQuality quality; + [Export("quality", ArgumentSemantic.Assign)] + SentryReplayQuality Quality { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull maskedViewClasses; + [Export("maskedViewClasses", ArgumentSemantic.Copy)] + Class[] MaskedViewClasses { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull unmaskedViewClasses; + [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] + Class[] UnmaskedViewClasses { get; set; } + + // @property (nonatomic) BOOL enableExperimentalViewRenderer __attribute__((deprecated("", "enableViewRendererV2"))); + [Export("enableExperimentalViewRenderer")] + bool EnableExperimentalViewRenderer { get; set; } + + // @property (nonatomic) BOOL enableViewRendererV2; + [Export("enableViewRendererV2")] + bool EnableViewRendererV2 { get; set; } + + // @property (nonatomic) BOOL enableFastViewRendering; + [Export("enableFastViewRendering")] + bool EnableFastViewRendering { get; set; } + + // @property (readonly, nonatomic) NSInteger replayBitRate; + [Export("replayBitRate")] + nint ReplayBitRate { get; } + + // @property (readonly, nonatomic) float sizeScale; + [Export("sizeScale")] + float SizeScale { get; } + + // @property (nonatomic) NSUInteger frameRate; + [Export("frameRate")] + nuint FrameRate { get; set; } + + // @property (nonatomic) NSTimeInterval errorReplayDuration; + [Export("errorReplayDuration")] + double ErrorReplayDuration { get; set; } + + // @property (nonatomic) NSTimeInterval sessionSegmentDuration; + [Export("sessionSegmentDuration")] + double SessionSegmentDuration { get; set; } + + // @property (nonatomic) NSTimeInterval maximumDuration; + [Export("maximumDuration")] + double MaximumDuration { get; set; } + + // -(instancetype _Nonnull)initWithDictionary:(NSDictionary * _Nonnull)dictionary; + [Export("initWithDictionary:")] + NativeHandle Constructor(NSDictionary dictionary); + + // -(instancetype _Nonnull)initWithSessionSampleRate:(float)sessionSampleRate onErrorSampleRate:(float)onErrorSampleRate maskAllText:(BOOL)maskAllText maskAllImages:(BOOL)maskAllImages enableViewRendererV2:(BOOL)enableViewRendererV2 enableFastViewRendering:(BOOL)enableFastViewRendering; + [Export("initWithSessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:")] + NativeHandle Constructor(float sessionSampleRate, float onErrorSampleRate, bool maskAllText, bool maskAllImages, bool enableViewRendererV2, bool enableFastViewRendering); +} + +// @interface SentrySDK : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry9SentrySDK")] +[Internal] +interface SentrySDK +{ + // @property (readonly, nonatomic, strong, class) id _Nullable span; + [Static] + [NullAllowed, Export("span", ArgumentSemantic.Strong)] + SentrySpan Span { get; } + + // @property (readonly, nonatomic, class) BOOL isEnabled; + [Static] + [Export("isEnabled")] + bool IsEnabled { get; } + + // @property (readonly, nonatomic, strong, class) SentryReplayApi * _Nonnull replay; + [Static] + [Export("replay", ArgumentSemantic.Strong)] + SentryReplayApi Replay { get; } + + // @property (readonly, nonatomic, strong, class) SentryLogger * _Nonnull logger; + [Static] + [Export("logger", ArgumentSemantic.Strong)] + SentryLogger Logger { get; } + + // +(void)startWithOptions:(SentryOptions * _Nonnull)options; + [Static] + [Export("startWithOptions:")] + void StartWithOptions(SentryOptions options); + + // +(void)startWithConfigureOptions:(void (^ _Nonnull)(SentryOptions * _Nonnull))configureOptions; + [Static] + [Export("startWithConfigureOptions:")] + void StartWithConfigureOptions(Action configureOptions); + + // +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event; + [Static] + [Export("captureEvent:")] + SentryId CaptureEvent(SentryEvent @event); + + // +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope; + [Static] + [Export("captureEvent:withScope:")] + SentryId CaptureEvent(SentryEvent @event, SentryScope scope); + + // +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; + [Static] + [Export("captureEvent:withScopeBlock:")] + SentryId CaptureEvent(SentryEvent @event, Action block); + + // +(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; + [Static] + [Export("startTransactionWithName:operation:")] + SentrySpan StartTransactionWithName(string name, string operation); + + // +(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope; + [Static] + [Export("startTransactionWithName:operation:bindToScope:")] + SentrySpan StartTransactionWithName(string name, string operation, bool bindToScope); + + // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext; + [Static] + [Export("startTransactionWithContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext); + + // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope; + [Static] + [Export("startTransactionWithContext:bindToScope:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope); + + // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; + [Static] + [Export("startTransactionWithContext:bindToScope:customSamplingContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, bool bindToScope, NSDictionary customSamplingContext); + + // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; + [Static] + [Export("startTransactionWithContext:customSamplingContext:")] + SentrySpan StartTransactionWithContext(SentryTransactionContext transactionContext, NSDictionary customSamplingContext); + + // +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error; + [Static] + [Export("captureError:")] + SentryId CaptureError(NSError error); + + // +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope; + [Static] + [Export("captureError:withScope:")] + SentryId CaptureError(NSError error, SentryScope scope); + + // +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; + [Static] + [Export("captureError:withScopeBlock:")] + SentryId CaptureError(NSError error, Action block); + + // +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception; + [Static] + [Export("captureException:")] + SentryId CaptureException(NSException exception); + + // +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope; + [Static] + [Export("captureException:withScope:")] + SentryId CaptureException(NSException exception, SentryScope scope); + + // +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; + [Static] + [Export("captureException:withScopeBlock:")] + SentryId CaptureException(NSException exception, Action block); + + // +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message; + [Static] + [Export("captureMessage:")] + SentryId CaptureMessage(string message); + + // +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope; + [Static] + [Export("captureMessage:withScope:")] + SentryId CaptureMessage(string message, SentryScope scope); + + // +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; + [Static] + [Export("captureMessage:withScopeBlock:")] + SentryId CaptureMessage(string message, Action block); + + // +(void)captureFeedback:(SentryFeedback * _Nonnull)feedback; + [Static] + [Export("captureFeedback:")] + void CaptureFeedback(SentryFeedback feedback); + [Static] + [Export("feedback", ArgumentSemantic.Strong)] + SentryFeedbackAPI Feedback { get; } + + // +(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb; + [Static] + [Export("addBreadcrumb:")] + void AddBreadcrumb(SentryBreadcrumb crumb); + + // +(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback; + [Static] + [Export("configureScope:")] + void ConfigureScope(Action callback); + + // @property (readonly, nonatomic, class) BOOL crashedLastRun; + [Static] + [Export("crashedLastRun")] + bool CrashedLastRun { get; } + + // @property (readonly, nonatomic, class) BOOL detectedStartUpCrash; + [Static] + [Export("detectedStartUpCrash")] + bool DetectedStartUpCrash { get; } + + // +(void)setUser:(SentryUser * _Nullable)user; + [Static] + [Export("setUser:")] + void SetUser([NullAllowed] SentryUser user); + + // +(void)startSession; + [Static] + [Export("startSession")] + void StartSession(); + + // +(void)endSession; + [Static] + [Export("endSession")] + void EndSession(); + + // +(void)crash; + [Static] + [Export("crash")] + void Crash(); + + // +(void)reportFullyDisplayed; + [Static] + [Export("reportFullyDisplayed")] + void ReportFullyDisplayed(); + + // +(void)pauseAppHangTracking; + [Static] + [Export("pauseAppHangTracking")] + void PauseAppHangTracking(); + + // +(void)resumeAppHangTracking; + [Static] + [Export("resumeAppHangTracking")] + void ResumeAppHangTracking(); + + // +(void)flush:(NSTimeInterval)timeout; + [Static] + [Export("flush:")] + void Flush(double timeout); + + // +(void)close; + [Static] + [Export("close")] + void Close(); + + // +(void)startProfiler; + [Static] + [Export("startProfiler")] + void StartProfiler(); + + // +(void)stopProfiler; + [Static] + [Export("stopProfiler")] + void StopProfiler(); + + // +(void)clearLogger; + [Static] + [Export("clearLogger")] + void ClearLogger(); +} + +// @protocol SentryViewScreenshotProvider +[Protocol(Name = "_TtP6Sentry28SentryViewScreenshotProvider_")] +[BaseType(typeof(NSObject), Name = "_TtP6Sentry28SentryViewScreenshotProvider_")] +[Internal] +interface SentryViewScreenshotProvider +{ + // @required -(void)imageWithView:(UIView * _Nonnull)view onComplete:(void (^ _Nonnull)(UIImage * _Nonnull))onComplete; + [Abstract] + [Export("imageWithView:onComplete:")] + void OnComplete(UIView view, Action onComplete); +} + +// @interface SentryViewScreenshotOptions : NSObject +[BaseType(typeof(NSObject), Name = "_TtC6Sentry27SentryViewScreenshotOptions")] +[Internal] +interface SentryViewScreenshotOptions : SentryRedactOptions +{ + // @property (nonatomic) BOOL enableViewRendererV2; + [Export("enableViewRendererV2")] + bool EnableViewRendererV2 { get; set; } + + // @property (nonatomic) BOOL enableFastViewRendering; + [Export("enableFastViewRendering")] + bool EnableFastViewRendering { get; set; } + + // @property (nonatomic) BOOL maskAllImages; + [Export("maskAllImages")] + bool MaskAllImages { get; set; } + + // @property (nonatomic) BOOL maskAllText; + [Export("maskAllText")] + bool MaskAllText { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull maskedViewClasses; + [Export("maskedViewClasses", ArgumentSemantic.Copy)] + Class[] MaskedViewClasses { get; set; } + + // @property (copy, nonatomic) NSArray * _Nonnull unmaskedViewClasses; + [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); + [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); + [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")] + [Export("total")] nuint Total { get; } // @property (readonly, assign, nonatomic) NSUInteger frozen; - [Export ("frozen")] + [Export("frozen")] nuint Frozen { get; } // @property (readonly, assign, nonatomic) NSUInteger slow; - [Export ("slow")] + [Export("slow")] nuint Slow { get; } // @property (readonly, copy, nonatomic) SentryFrameInfoTimeSeries * _Nonnull slowFrameTimestamps; - [Export ("slowFrameTimestamps", ArgumentSemantic.Copy)] + [Export("slowFrameTimestamps", ArgumentSemantic.Copy)] NSDictionary[] SlowFrameTimestamps { get; } // @property (readonly, copy, nonatomic) SentryFrameInfoTimeSeries * _Nonnull frozenFrameTimestamps; - [Export ("frozenFrameTimestamps", ArgumentSemantic.Copy)] + [Export("frozenFrameTimestamps", ArgumentSemantic.Copy)] NSDictionary[] FrozenFrameTimestamps { get; } // @property (readonly, copy, nonatomic) SentryFrameInfoTimeSeries * _Nonnull frameRateTimestamps; - [Export ("frameRateTimestamps", ArgumentSemantic.Copy)] + [Export("frameRateTimestamps", ArgumentSemantic.Copy)] NSDictionary[] FrameRateTimestamps { get; } } // @interface PrivateSentrySDKOnly : NSObject -[BaseType (typeof(NSObject))] +[BaseType(typeof(NSObject))] [Internal] interface PrivateSentrySDKOnly { + // +(NSArray * _Nonnull)getDebugImages; [Static] - [Export ("getDebugImages")] + [Export("getDebugImages")] SentryDebugMeta[] DebugImages { get; } // +(NSArray * _Nonnull)getDebugImagesCrashed:(BOOL)isCrash; [Static] - [Export ("getDebugImagesCrashed:")] - SentryDebugMeta[] GetDebugImagesCrashed (bool isCrash); + [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); + [Export("setSdkName:andVersionString:")] + void SetSdkName(string sdkName, string versionString); // +(void)setSdkName:(NSString * _Nonnull)sdkName; [Static] - [Export ("setSdkName:")] - void SetSdkName (string sdkName); + [Export("setSdkName:")] + void SetSdkName(string sdkName); // +(NSString * _Nonnull)getSdkName; [Static] - [Export ("getSdkName")] + [Export("getSdkName")] string SdkName { get; } // +(NSString * _Nonnull)getSdkVersionString; [Static] - [Export ("getSdkVersionString")] + [Export("getSdkVersionString")] string SdkVersionString { get; } // +(void)addSdkPackage:(NSString * _Nonnull)name version:(NSString * _Nonnull)version; [Static] - [Export ("addSdkPackage:version:")] - void AddSdkPackage (string name, string version); + [Export("addSdkPackage:version:")] + void AddSdkPackage(string name, string version); // +(NSDictionary * _Nonnull)getExtraContext; [Static] - [Export ("getExtraContext")] + [Export("getExtraContext")] NSDictionary ExtraContext { get; } // +(void)setTrace:(SentryId * _Nonnull)traceId spanId:(SentrySpanId * _Nonnull)spanId; [Static] - [Export ("setTrace:spanId:")] - void SetTrace (SentryId traceId, SentrySpanId spanId); + [Export("setTrace:spanId:")] + void SetTrace(SentryId traceId, SentrySpanId spanId); // +(uint64_t)startProfilerForTrace:(SentryId * _Nonnull)traceId; [Static] - [Export ("startProfilerForTrace:")] - ulong StartProfilerForTrace (SentryId traceId); + [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:")] + [Export("collectProfileBetween:and:forTrace:")] [return: NullAllowed] - NSMutableDictionary CollectProfileBetween (ulong startSystemTime, ulong endSystemTime, SentryId traceId); + NSMutableDictionary CollectProfileBetween(ulong startSystemTime, ulong endSystemTime, SentryId traceId); // +(void)discardProfilerForTrace:(SentryId * _Nonnull)traceId; [Static] - [Export ("discardProfilerForTrace:")] - void DiscardProfilerForTrace (SentryId traceId); + [Export("discardProfilerForTrace:")] + void DiscardProfilerForTrace(SentryId traceId); // @property (readonly, copy, nonatomic, class) NSString * _Nonnull installationID; [Static] - [Export ("installationID")] + [Export("installationID")] string InstallationID { get; } // @property (readonly, copy, nonatomic, class) SentryOptions * _Nonnull options; [Static] - [Export ("options", ArgumentSemantic.Copy)] + [Export("options", ArgumentSemantic.Copy)] SentryOptions Options { get; } - // @property (assign, nonatomic, class) BOOL appStartMeasurementHybridSDKMode; - [Static] - [Export ("appStartMeasurementHybridSDKMode")] - bool AppStartMeasurementHybridSDKMode { get; set; } - // @property (assign, nonatomic, class) BOOL framesTrackingMeasurementHybridSDKMode; [Static] - [Export ("framesTrackingMeasurementHybridSDKMode")] + [Export("framesTrackingMeasurementHybridSDKMode")] bool FramesTrackingMeasurementHybridSDKMode { get; set; } // @property (readonly, assign, nonatomic, class) BOOL isFramesTrackingRunning; [Static] - [Export ("isFramesTrackingRunning")] + [Export("isFramesTrackingRunning")] bool IsFramesTrackingRunning { get; } // @property (readonly, assign, nonatomic, class) SentryScreenFrames * _Nonnull currentScreenFrames; [Static] - [Export ("currentScreenFrames", ArgumentSemantic.Assign)] + [Export("currentScreenFrames", ArgumentSemantic.Assign)] SentryScreenFrames CurrentScreenFrames { get; } // +(NSArray * _Nonnull)captureScreenshots; [Static] - [Export ("captureScreenshots")] + [Export("captureScreenshots")] NSData[] CaptureScreenshots(); // +(NSData * _Nonnull)captureViewHierarchy; [Static] - [Export ("captureViewHierarchy")] + [Export("captureViewHierarchy")] NSData CaptureViewHierarchy(); // +(void)setCurrentScreen:(NSString * _Nullable)screenName; [Static] - [Export ("setCurrentScreen:")] - void SetCurrentScreen ([NullAllowed] string screenName); + [Export("setCurrentScreen:")] + void SetCurrentScreen([NullAllowed] string screenName); // +(UIView * _Nonnull)sessionReplayMaskingOverlay:(id _Nonnull)options; [Static] - [Export ("sessionReplayMaskingOverlay:")] - UIView SessionReplayMaskingOverlay (SentryRedactOptions options); + [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); + [Export("configureSessionReplayWith:screenshotProvider:")] + void ConfigureSessionReplayWith([NullAllowed] SentryReplayBreadcrumbConverter breadcrumbConverter, [NullAllowed] SentryViewScreenshotProvider screenshotProvider); // +(void)captureReplay; [Static] - [Export ("captureReplay")] - void CaptureReplay (); + [Export("captureReplay")] + void CaptureReplay(); // +(NSString * _Nullable)getReplayId; [Static] - [NullAllowed, Export ("getReplayId")] + [NullAllowed, Export("getReplayId")] string ReplayId { get; } // +(void)addReplayIgnoreClasses:(NSArray * _Nonnull)classes; [Static] - [Export ("addReplayIgnoreClasses:")] - void AddReplayIgnoreClasses (Class[] classes); + [Export("addReplayIgnoreClasses:")] + void AddReplayIgnoreClasses(Class[] classes); // +(void)addReplayRedactClasses:(NSArray * _Nonnull)classes; [Static] - [Export ("addReplayRedactClasses:")] - void AddReplayRedactClasses (Class[] classes); + [Export("addReplayRedactClasses:")] + void AddReplayRedactClasses(Class[] classes); // +(void)setIgnoreContainerClass:(Class _Nonnull)containerClass; [Static] - [Export ("setIgnoreContainerClass:")] - void SetIgnoreContainerClass (Class containerClass); + [Export("setIgnoreContainerClass:")] + void SetIgnoreContainerClass(Class containerClass); // +(void)setRedactContainerClass:(Class _Nonnull)containerClass; [Static] - [Export ("setRedactContainerClass:")] - void SetRedactContainerClass (Class containerClass); + [Export("setRedactContainerClass:")] + void SetRedactContainerClass(Class containerClass); // +(void)setReplayTags:(NSDictionary * _Nonnull)tags; [Static] - [Export ("setReplayTags:")] - void SetReplayTags (NSDictionary tags); - - // +(NSDictionary * _Nullable)appStartMeasurementWithSpans; - [Static] - [NullAllowed, Export ("appStartMeasurementWithSpans")] - NSDictionary AppStartMeasurementWithSpans { get; } + [Export("setReplayTags:")] + void SetReplayTags(NSDictionary tags); // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary; [Static] - [Export ("userWithDictionary:")] - SentryUser UserWithDictionary (NSDictionary dictionary); + [Export("userWithDictionary:")] + SentryUser UserWithDictionary(NSDictionary dictionary); // +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary; [Static] - [Export ("breadcrumbWithDictionary:")] - SentryBreadcrumb BreadcrumbWithDictionary (NSDictionary dictionary); + [Export("breadcrumbWithDictionary:")] + SentryBreadcrumb BreadcrumbWithDictionary(NSDictionary dictionary); } diff --git a/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj b/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj index 8628626950..a13704f041 100644 --- a/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj +++ b/src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj @@ -42,9 +42,7 @@ - - diff --git a/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs b/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs index 9735003cd1..1077aa21f2 100644 --- a/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs +++ b/src/Sentry.Bindings.Cocoa/StructsAndEnums.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------------- // This file is auto-generated by Objective Sharpie and patched via the script -// at /scripts/generate-cocoa-bindings.ps1. Do not edit this file directly. +// at /scripts/patch-cocoa-bindings.cs. Do not edit this file directly. // If changes are required, update the script instead. // ----------------------------------------------------------------------------- @@ -66,3 +66,84 @@ internal enum SentrySpanStatus : ulong OutOfRange, DataLoss } + +[Native] +internal enum SentryANRType : long +{ + FatalFullyBlocking = 0, + FatalNonFullyBlocking = 1, + FullyBlocking = 2, + NonFullyBlocking = 3, + Unknown = 4 +} + +[Native] +internal enum SentryFeedbackSource : long +{ + Widget = 0, + Custom = 1 +} + +[Native] +internal enum SentryLevel : ulong +{ + None = 0, + Debug = 1, + Info = 2, + Warning = 3, + Error = 4, + Fatal = 5 +} + +[Native] +internal enum SentryStructuredLogLevel : long +{ + Trace = 0, + Debug = 1, + Info = 2, + Warn = 3, + Error = 4, + Fatal = 5 +} + +[Native] +internal enum SentryProfileLifecycle : long +{ + Manual = 0, + Trace = 1 +} + +[Native] +internal enum SentryReplayQuality : long +{ + Low = 0, + Medium = 1, + High = 2 +} + +[Native] +internal enum SentryReplayType : long +{ + Session = 0, + Buffer = 1 +} + +[Native] +internal enum SentrySessionStatus : ulong +{ + Ok = 0, + Exited = 1, + Crashed = 2, + Abnormal = 3 +} + +[Native] +internal enum SentryTransactionNameSource : long +{ + Custom = 0, + Url = 1, + Route = 2, + View = 3, + Component = 4, + Task = 5 +} diff --git a/src/Sentry.Bindings.Cocoa/SwiftApiDefinitions.cs b/src/Sentry.Bindings.Cocoa/SwiftApiDefinitions.cs deleted file mode 100644 index 1bf7b8ded4..0000000000 --- a/src/Sentry.Bindings.Cocoa/SwiftApiDefinitions.cs +++ /dev/null @@ -1,893 +0,0 @@ -/* - * This file defines iOS API contracts for the members we need from Sentry-Swift.h - * Note that we are **not** using Objective Sharpie to generate contracts (instead they're maintained manually). - */ -using System; -using Foundation; -using ObjCRuntime; -using UIKit; - -namespace Sentry.CocoaSdk; - -[BaseType(typeof(NSObject), Name = "_TtC6Sentry14SentryFeedback")] -[DisableDefaultCtor] // Marks the default constructor as unavailable -[Internal] -interface SentryFeedback -{ - [Export("name", ArgumentSemantic.Copy)] - string Name { get; set; } - - [Export("email", ArgumentSemantic.Copy)] - string Email { get; set; } - - [Export("message", ArgumentSemantic.Copy)] - string Message { get; set; } - - [Export("source")] - SentryFeedbackSource Source { get; set; } - - [Export("eventId", ArgumentSemantic.Strong)] - SentryId EventId { get; } - - [Export("associatedEventId", ArgumentSemantic.Strong)] - SentryId AssociatedEventId { get; set; } - - [Export("initWithMessage:name:email:source:associatedEventId:attachments:")] - [DesignatedInitializer] - IntPtr Constructor(string message, [NullAllowed] string name, [NullAllowed] string email, SentryFeedbackSource source, [NullAllowed] SentryId associatedEventId, [NullAllowed] NSData[] attachments); -} - -// @interface SentryId : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry8SentryId")] -[Internal] -interface SentryId -{ - // @property (nonatomic, strong, class) SentryId * _Nonnull empty; - [Static] - [Export ("empty", ArgumentSemantic.Strong)] - SentryId Empty { get; set; } - - // @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); - - // @property (readonly, nonatomic) NSUInteger hash; - [Export ("hash")] - nuint Hash { get; } -} - -// @interface SentryLog : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry9SentryLog")] -[DisableDefaultCtor] -[Internal] -interface SentryLog -{ - // @property (copy, nonatomic) NSDate * _Nonnull timestamp; - [Export ("timestamp", ArgumentSemantic.Copy)] - NSDate Timestamp { get; set; } - - // @property (nonatomic, strong) SentryId * _Nonnull traceId; - [Export ("traceId", ArgumentSemantic.Strong)] - SentryId TraceId { get; set; } - - // @property (nonatomic) enum SentryStructuredLogLevel level; - [Export ("level", ArgumentSemantic.Assign)] - SentryStructuredLogLevel 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; } -} - -// @interface SentryLogger : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry12SentryLogger")] -[DisableDefaultCtor] -[Internal] -interface SentryLogger -{ - // -(void)trace:(NSString * _Nonnull)body; - [Export ("trace:")] - void Trace (string body); - - // -(void)trace:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; - [Export ("trace:attributes:")] - void Trace (string body, NSDictionary attributes); - - // -(void)debug:(NSString * _Nonnull)body; - [Export ("debug:")] - void Debug (string body); - - // -(void)debug:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; - [Export ("debug:attributes:")] - void Debug (string body, NSDictionary attributes); - - // -(void)info:(NSString * _Nonnull)body; - [Export ("info:")] - void Info (string body); - - // -(void)info:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; - [Export ("info:attributes:")] - void Info (string body, NSDictionary attributes); - - // -(void)warn:(NSString * _Nonnull)body; - [Export ("warn:")] - void Warn (string body); - - // -(void)warn:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; - [Export ("warn:attributes:")] - void Warn (string body, NSDictionary attributes); - - // -(void)error:(NSString * _Nonnull)body; - [Export ("error:")] - void Error (string body); - - // -(void)error:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; - [Export ("error:attributes:")] - void Error (string body, NSDictionary attributes); - - // -(void)fatal:(NSString * _Nonnull)body; - [Export ("fatal:")] - void Fatal (string body); - - // -(void)fatal:(NSString * _Nonnull)body attributes:(NSDictionary * _Nonnull)attributes; - [Export ("fatal:attributes:")] - void Fatal (string body, NSDictionary attributes); -} - -// @interface SentryProfileOptions : NSObject -[BaseType(typeof(NSObject), Name = "_TtC6Sentry20SentryProfileOptions")] -[DisableDefaultCtor] -[Internal] -interface SentryProfileOptions -{ - // @property(nonatomic) enum SentryProfileLifecycle lifecycle; - [Export("lifecycle", ArgumentSemantic.Assign)] - SentryProfileLifecycle Lifecycle { get; set; } - - // @property(nonatomic) float sessionSampleRate; - [Export("sessionSampleRate")] - float SessionSampleRate { get; set; } - - // @property(nonatomic) BOOL profileAppStarts; - [Export("profileAppStarts")] - bool ProfileAppStarts { get; set; } - - // - (nonnull instancetype) init OBJC_DESIGNATED_INITIALIZER; - [Export("init")] - [DesignatedInitializer] - NativeHandle Constructor(); -} - -// @interface SentrySessionReplayIntegration : SentryBaseIntegration -[BaseType (typeof(NSObject))] -[Internal] -interface SentrySessionReplayIntegration -{ - // -(instancetype _Nonnull)initForManualUse:(SentryOptions * _Nonnull)options; - [Export ("initForManualUse:")] - NativeHandle Constructor (SentryOptions options); - // -(BOOL)captureReplay; - [Export ("captureReplay")] - bool CaptureReplay(); - // -(void)configureReplayWith:(id _Nullable)breadcrumbConverter screenshotProvider:(id _Nullable)screenshotProvider; - [Export ("configureReplayWith:screenshotProvider:")] - void ConfigureReplayWith ([NullAllowed] SentryReplayBreadcrumbConverter breadcrumbConverter, [NullAllowed] SentryViewScreenshotProvider screenshotProvider); - // -(void)pause; - [Export ("pause")] - void Pause (); - // -(void)resume; - [Export ("resume")] - void Resume (); - // -(void)stop; - [Export ("stop")] - void Stop (); - // -(void)start; - [Export ("start")] - void Start (); - // +(id _Nonnull)createBreadcrumbwithTimestamp:(NSDate * _Nonnull)timestamp category:(NSString * _Nonnull)category message:(NSString * _Nullable)message level:(enum SentryLevel)level data:(NSDictionary * _Nullable)data; - [Static] - [Export ("createBreadcrumbwithTimestamp:category:message:level:data:")] - SentryRRWebEvent CreateBreadcrumbwithTimestamp (NSDate timestamp, string category, [NullAllowed] string message, SentryLevel level, [NullAllowed] NSDictionary data); - // +(id _Nonnull)createNetworkBreadcrumbWithTimestamp:(NSDate * _Nonnull)timestamp endTimestamp:(NSDate * _Nonnull)endTimestamp operation:(NSString * _Nonnull)operation description:(NSString * _Nonnull)description data:(NSDictionary * _Nonnull)data; - [Static] - [Export ("createNetworkBreadcrumbWithTimestamp:endTimestamp:operation:description:data:")] - SentryRRWebEvent CreateNetworkBreadcrumbWithTimestamp (NSDate timestamp, NSDate endTimestamp, string operation, string description, NSDictionary data); - // +(id _Nonnull)createDefaultBreadcrumbConverter; - [Static] - [Export ("createDefaultBreadcrumbConverter")] - SentryReplayBreadcrumbConverter CreateDefaultBreadcrumbConverter(); -} - -[Protocol(Name = "_TtP6Sentry19SentryRedactOptions_")] -[Model] -[BaseType(typeof(NSObject))] -[Internal] -internal interface SentryRedactOptions -{ - [Abstract] - [Export("maskAllText")] - bool MaskAllText { get; } - - [Abstract] - [Export("maskAllImages")] - bool MaskAllImages { get; } - - [Abstract] - [Export("maskedViewClasses", ArgumentSemantic.Copy)] - Class[] MaskedViewClasses { get; } - - [Abstract] - [Export("unmaskedViewClasses", ArgumentSemantic.Copy)] - Class[] UnmaskedViewClasses { get; } -} - -// @protocol SentryReplayBreadcrumbConverter -[Protocol (Name = "_TtP6Sentry31SentryReplayBreadcrumbConverter_")] -[BaseType (typeof(NSObject), Name = "_TtP6Sentry31SentryReplayBreadcrumbConverter_")] -[Model] -[Internal] -interface SentryReplayBreadcrumbConverter -{ - // @required -(id _Nullable)convertFrom:(SentryBreadcrumb * _Nonnull)breadcrumb __attribute__((warn_unused_result(""))); - [Abstract] - [Export ("convertFrom:")] - [return: NullAllowed] - SentryRRWebEvent ConvertFrom (SentryBreadcrumb breadcrumb); -} - -// @interface SentryReplayOptions : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry19SentryReplayOptions")] -[Internal] -interface SentryReplayOptions //: ISentryRedactOptions -{ - // @property (nonatomic) float sessionSampleRate; - [Export ("sessionSampleRate")] - float SessionSampleRate { get; set; } - // @property (nonatomic) float onErrorSampleRate; - [Export ("onErrorSampleRate")] - float OnErrorSampleRate { get; set; } - // @property (nonatomic) BOOL maskAllText; - [Export ("maskAllText")] - bool MaskAllText { get; set; } - // @property (nonatomic) BOOL maskAllImages; - [Export ("maskAllImages")] - bool MaskAllImages { get; set; } - // @property (nonatomic) enum SentryReplayQuality quality; - [Export ("quality", ArgumentSemantic.Assign)] - SentryReplayQuality Quality { get; set; } - /* - // @property (copy, nonatomic) NSArray * _Nonnull maskedViewClasses; - //[Export ("maskedViewClasses", ArgumentSemantic.Copy)] - //Class[] MaskedViewClasses { get; set; } - // @property (copy, nonatomic) NSArray * _Nonnull unmaskedViewClasses; - //[Export ("unmaskedViewClasses", ArgumentSemantic.Copy)] - //Class[] UnmaskedViewClasses { get; set; } - // @property (readonly, nonatomic) NSInteger replayBitRate; - [Export ("replayBitRate")] - nint ReplayBitRate { get; } - // @property (readonly, nonatomic) float sizeScale; - [Export ("sizeScale")] - float SizeScale { get; } - // @property (nonatomic) NSUInteger frameRate; - [Export ("frameRate")] - nuint FrameRate { get; set; } - // @property (readonly, nonatomic) NSTimeInterval errorReplayDuration; - [Export ("errorReplayDuration")] - double ErrorReplayDuration { get; } - // @property (readonly, nonatomic) NSTimeInterval sessionSegmentDuration; - [Export ("sessionSegmentDuration")] - double SessionSegmentDuration { get; } - // @property (readonly, nonatomic) NSTimeInterval maximumDuration; - [Export ("maximumDuration")] - double MaximumDuration { get; } - // -(instancetype _Nonnull)initWithSessionSampleRate:(float)sessionSampleRate onErrorSampleRate:(float)onErrorSampleRate maskAllText:(BOOL)maskAllText maskAllImages:(BOOL)maskAllImages __attribute__((objc_designated_initializer)); - [Export ("initWithSessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:")] - [DesignatedInitializer] - NativeHandle Constructor (float sessionSampleRate, float onErrorSampleRate, bool maskAllText, bool maskAllImages); - // -(instancetype _Nonnull)initWithDictionary:(NSDictionary * _Nonnull)dictionary; - [Export ("initWithDictionary:")] - NativeHandle Constructor (NSDictionary dictionary); - */ -} - -// @interface SentryRRWebEvent : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry16SentryRRWebEvent")] -[Protocol] -[Model] -[DisableDefaultCtor] -[Internal] -interface SentryRRWebEvent : SentrySerializable -{ - // @property (readonly, nonatomic) enum SentryRRWebEventType type; - [Export ("type")] - SentryRRWebEventType Type { get; } - // @property (readonly, copy, nonatomic) NSDate * _Nonnull timestamp; - [Export ("timestamp", ArgumentSemantic.Copy)] - NSDate Timestamp { get; } - // @property (readonly, copy, nonatomic) NSDictionary * _Nullable data; - [NullAllowed, Export ("data", ArgumentSemantic.Copy)] - NSDictionary Data { get; } - // -(instancetype _Nonnull)initWithType:(enum SentryRRWebEventType)type timestamp:(NSDate * _Nonnull)timestamp data:(NSDictionary * _Nullable)data __attribute__((objc_designated_initializer)); - [Export ("initWithType:timestamp:data:")] - [DesignatedInitializer] - NativeHandle Constructor (SentryRRWebEventType type, NSDate timestamp, [NullAllowed] NSDictionary data); -} - -// @interface SentrySDK : NSObject -[BaseType(typeof(NSObject), Name = "_TtC6Sentry9SentrySDK")] -[DisableDefaultCtor] -[Internal] -interface SentrySDK -{ - // @property (readonly, nonatomic, strong, class) id _Nullable span; - [Static] - [NullAllowed, Export ("span", ArgumentSemantic.Strong)] - SentrySpan Span { get; } - - // @property (readonly, nonatomic, class) BOOL isEnabled; - [Static] - [Export ("isEnabled")] - bool IsEnabled { get; } - - // @property (readonly, nonatomic, strong, class) SentryReplayApi * _Nonnull replay; - [Static] - [Export ("replay", ArgumentSemantic.Strong)] - SentryReplayApi Replay { get; } - - // @property (readonly, nonatomic, strong, class) SentryLogger * _Nonnull logger; - [Static] - [Export ("logger", ArgumentSemantic.Strong)] - SentryLogger Logger { get; } - - // +(void)startWithOptions:(SentryOptions * _Nonnull)options; - [Static] - [Export ("startWithOptions:")] - void StartWithOptions (SentryOptions options); - - // +(void)startWithConfigureOptions:(void (^ _Nonnull)(SentryOptions * _Nonnull))configureOptions; - [Static] - [Export ("startWithConfigureOptions:")] - void StartWithConfigureOptions (Action configureOptions); - - // +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event; - [Static] - [Export ("captureEvent:")] - SentryId CaptureEvent (SentryEvent @event); - - // +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScope:(SentryScope * _Nonnull)scope; - [Static] - [Export ("captureEvent:withScope:")] - SentryId CaptureEvent (SentryEvent @event, SentryScope scope); - - // +(SentryId * _Nonnull)captureEvent:(SentryEvent * _Nonnull)event withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; - [Static] - [Export ("captureEvent:withScopeBlock:")] - SentryId CaptureEvent (SentryEvent @event, Action block); - - // +(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation; - [Static] - [Export ("startTransactionWithName:operation:")] - SentrySpan StartTransactionWithName (string name, string operation); - - // +(id _Nonnull)startTransactionWithName:(NSString * _Nonnull)name operation:(NSString * _Nonnull)operation bindToScope:(BOOL)bindToScope; - [Static] - [Export ("startTransactionWithName:operation:bindToScope:")] - SentrySpan StartTransactionWithName (string name, string operation, bool bindToScope); - - // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext; - [Static] - [Export ("startTransactionWithContext:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext); - - // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope; - [Static] - [Export ("startTransactionWithContext:bindToScope:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, bool bindToScope); - - // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext bindToScope:(BOOL)bindToScope customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; - [Static] - [Export ("startTransactionWithContext:bindToScope:customSamplingContext:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, bool bindToScope, NSDictionary customSamplingContext); - - // +(id _Nonnull)startTransactionWithContext:(SentryTransactionContext * _Nonnull)transactionContext customSamplingContext:(NSDictionary * _Nonnull)customSamplingContext; - [Static] - [Export ("startTransactionWithContext:customSamplingContext:")] - SentrySpan StartTransactionWithContext (SentryTransactionContext transactionContext, NSDictionary customSamplingContext); - - // +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error; - [Static] - [Export ("captureError:")] - SentryId CaptureError (NSError error); - - // +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScope:(SentryScope * _Nonnull)scope; - [Static] - [Export ("captureError:withScope:")] - SentryId CaptureError (NSError error, SentryScope scope); - - // +(SentryId * _Nonnull)captureError:(NSError * _Nonnull)error withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; - [Static] - [Export ("captureError:withScopeBlock:")] - SentryId CaptureError (NSError error, Action block); - - // +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception; - [Static] - [Export ("captureException:")] - SentryId CaptureException (NSException exception); - - // +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScope:(SentryScope * _Nonnull)scope; - [Static] - [Export ("captureException:withScope:")] - SentryId CaptureException (NSException exception, SentryScope scope); - - // +(SentryId * _Nonnull)captureException:(NSException * _Nonnull)exception withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; - [Static] - [Export ("captureException:withScopeBlock:")] - SentryId CaptureException (NSException exception, Action block); - - // +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message; - [Static] - [Export ("captureMessage:")] - SentryId CaptureMessage (string message); - - // +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScope:(SentryScope * _Nonnull)scope; - [Static] - [Export ("captureMessage:withScope:")] - SentryId CaptureMessage (string message, SentryScope scope); - - // +(SentryId * _Nonnull)captureMessage:(NSString * _Nonnull)message withScopeBlock:(void (^ _Nonnull)(SentryScope * _Nonnull))block; - [Static] - [Export ("captureMessage:withScopeBlock:")] - SentryId CaptureMessage (string message, Action block); - - // +(void)captureUserFeedback:(SentryUserFeedback * _Nonnull)userFeedback __attribute__((deprecated("Use SentrySDK.back or use or configure our new managed UX with SentryOptions.configureUserFeedback."))); - [Static] - [Export ("captureUserFeedback:")] - void CaptureUserFeedback (SentryUserFeedback userFeedback); - - // +(void)captureFeedback:(SentryFeedback * _Nonnull)feedback; - [Static] - [Export ("captureFeedback:")] - void CaptureFeedback (SentryFeedback feedback); - - // @property (readonly, nonatomic, strong, class) SentryFeedbackAPI * _Nonnull feedback __attribute__((availability(ios, introduced=13.0))); - [Static] - [Export ("feedback", ArgumentSemantic.Strong)] - SentryFeedbackAPI Feedback { get; } - - // +(void)addBreadcrumb:(SentryBreadcrumb * _Nonnull)crumb; - [Static] - [Export ("addBreadcrumb:")] - void AddBreadcrumb (SentryBreadcrumb crumb); - - // +(void)configureScope:(void (^ _Nonnull)(SentryScope * _Nonnull))callback; - [Static] - [Export ("configureScope:")] - void ConfigureScope (Action callback); - - // @property (readonly, nonatomic, class) BOOL crashedLastRun; - [Static] - [Export ("crashedLastRun")] - bool CrashedLastRun { get; } - - // @property (readonly, nonatomic, class) BOOL detectedStartUpCrash; - [Static] - [Export ("detectedStartUpCrash")] - bool DetectedStartUpCrash { get; } - - // +(void)setUser:(SentryUser * _Nullable)user; - [Static] - [Export ("setUser:")] - void SetUser ([NullAllowed] SentryUser user); - - // +(void)startSession; - [Static] - [Export ("startSession")] - void StartSession (); - - // +(void)endSession; - [Static] - [Export ("endSession")] - void EndSession (); - - // +(void)crash; - [Static] - [Export ("crash")] - void Crash (); - - // +(void)reportFullyDisplayed; - [Static] - [Export ("reportFullyDisplayed")] - void ReportFullyDisplayed (); - - // +(void)pauseAppHangTracking; - [Static] - [Export ("pauseAppHangTracking")] - void PauseAppHangTracking (); - - // +(void)resumeAppHangTracking; - [Static] - [Export ("resumeAppHangTracking")] - void ResumeAppHangTracking (); - - // +(void)flush:(NSTimeInterval)timeout; - [Static] - [Export ("flush:")] - void Flush (double timeout); - - // +(void)close; - [Static] - [Export ("close")] - void Close (); - - // +(void)startProfiler; - [Static] - [Export ("startProfiler")] - void StartProfiler (); - - // +(void)stopProfiler; - [Static] - [Export ("stopProfiler")] - void StopProfiler (); - - // +(void)clearLogger; - [Static] - [Export ("clearLogger")] - void ClearLogger (); -} - -// @interface SentrySession : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry13SentrySession")] -[DisableDefaultCtor] -[Internal] -interface SentrySession -{ - // -(instancetype _Nonnull)initWithReleaseName:(NSString * _Nonnull)releaseName distinctId:(NSString * _Nonnull)distinctId __attribute__((objc_designated_initializer)); - [Export ("initWithReleaseName:distinctId:")] - [DesignatedInitializer] - NativeHandle Constructor (string releaseName, string distinctId); - - // -(instancetype _Nullable)initWithJSONObject:(NSDictionary * _Nonnull)jsonObject __attribute__((objc_designated_initializer)); - [Export ("initWithJSONObject:")] - [DesignatedInitializer] - NativeHandle Constructor (NSDictionary jsonObject); - - // -(void)endSessionExitedWithTimestamp:(NSDate * _Nonnull)timestamp; - [Export ("endSessionExitedWithTimestamp:")] - void EndSessionExitedWithTimestamp (NSDate timestamp); - - // -(void)endSessionCrashedWithTimestamp:(NSDate * _Nonnull)timestamp; - [Export ("endSessionCrashedWithTimestamp:")] - void EndSessionCrashedWithTimestamp (NSDate timestamp); - - // -(void)endSessionAbnormalWithTimestamp:(NSDate * _Nonnull)timestamp; - [Export ("endSessionAbnormalWithTimestamp:")] - void EndSessionAbnormalWithTimestamp (NSDate timestamp); - - // -(void)incrementErrors; - [Export ("incrementErrors")] - void IncrementErrors (); - - // @property (readonly, copy, nonatomic) NSUUID * _Nonnull sessionId; - [Export ("sessionId", ArgumentSemantic.Copy)] - NSUuid SessionId { get; } - - // @property (readonly, copy, nonatomic) NSDate * _Nonnull started; - [Export ("started", ArgumentSemantic.Copy)] - NSDate Started { get; } - - // @property (readonly, nonatomic) enum SentrySessionStatus status; - [Export ("status")] - SentrySessionStatus Status { get; } - - // @property (nonatomic) NSUInteger errors; - [Export ("errors")] - nuint Errors { get; set; } - - // @property (readonly, nonatomic) NSUInteger sequence; - [Export ("sequence")] - nuint Sequence { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nonnull distinctId; - [Export ("distinctId")] - string DistinctId { get; } - - // @property (readonly, nonatomic, strong) NSNumber * _Nullable flagInit; - [NullAllowed, Export ("flagInit", ArgumentSemantic.Strong)] - NSNumber FlagInit { get; } - - // @property (readonly, copy, nonatomic) NSDate * _Nullable timestamp; - [NullAllowed, Export ("timestamp", ArgumentSemantic.Copy)] - NSDate Timestamp { get; } - - // @property (readonly, nonatomic, strong) NSNumber * _Nullable duration; - [NullAllowed, Export ("duration", ArgumentSemantic.Strong)] - NSNumber Duration { get; } - - // @property (readonly, copy, nonatomic) NSString * _Nullable releaseName; - [NullAllowed, Export ("releaseName")] - string ReleaseName { get; } - - // @property (copy, nonatomic) NSString * _Nullable environment; - [NullAllowed, Export ("environment")] - string Environment { get; set; } - - // @property (nonatomic, strong) SentryUser * _Nullable user; - [NullAllowed, Export ("user", ArgumentSemantic.Strong)] - SentryUser User { get; set; } - - // @property (copy, nonatomic) NSString * _Nullable abnormalMechanism; - [NullAllowed, Export ("abnormalMechanism")] - string AbnormalMechanism { get; set; } - - // -(NSDictionary * _Nonnull)serialize __attribute__((warn_unused_result(""))); - [Export ("serialize")] - NSDictionary Serialize(); - - // -(void)setFlagInit; - [Export ("setFlagInit")] - void SetFlagInit (); - - // -(id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone __attribute__((warn_unused_result(""))); - // [Export ("copyWithZone:")] - // unsafe NSObject CopyWithZone ([NullAllowed] _NSZone* zone); -} - -// @interface SentryUserFeedback : NSObject -[BaseType(typeof(NSObject))] -[DisableDefaultCtor] -[Internal] -interface SentryUserFeedback : SentrySerializable -{ - // @property (nonatomic, readonly, strong) SentryId * _Nonnull eventId; - [Export("eventId", ArgumentSemantic.Strong)] - SentryId EventId { get; } - - // @property (nonatomic, copy) NSString * _Nonnull name; - [Export("name")] - string Name { get; set; } - - // @property (nonatomic, copy) NSString * _Nonnull email; - [Export("email")] - string Email { get; set; } - - // @property (nonatomic, copy) NSString * _Nonnull comments; - [Export("comments")] - string Comments { get; set; } - - // - (nonnull instancetype)initWithEventId:(SentryId * _Nonnull)eventId OBJC_DESIGNATED_INITIALIZER; - [Export("initWithEventId:")] - NativeHandle Constructor(SentryId eventId); -} - -[BaseType(typeof(NSObject), Name = "_TtC6Sentry31SentryUserFeedbackConfiguration")] -[DisableDefaultCtor] -[Internal] -interface SentryUserFeedbackConfiguration -{ - [Export("animations")] - bool Animations { get; set; } - - [NullAllowed, Export("configureWidget", ArgumentSemantic.Copy)] - Action ConfigureWidget { get; set; } - - [Export("widgetConfig", ArgumentSemantic.Strong)] - SentryUserFeedbackWidgetConfiguration WidgetConfig { get; set; } - - [Export("useShakeGesture")] - bool UseShakeGesture { get; set; } - - [Export("showFormForScreenshots")] - bool ShowFormForScreenshots { get; set; } - - // [NullAllowed, Export("configureForm", ArgumentSemantic.Copy)] - // Action ConfigureForm { get; set; } - - // [Export("formConfig", ArgumentSemantic.Strong)] - // SentryUserFeedbackFormConfiguration FormConfig { get; set; } - - [NullAllowed, Export("tags", ArgumentSemantic.Copy)] - NSDictionary Tags { get; set; } - - [NullAllowed, Export("onFormOpen", ArgumentSemantic.Copy)] - Action OnFormOpen { get; set; } - - [NullAllowed, Export("onFormClose", ArgumentSemantic.Copy)] - Action OnFormClose { get; set; } - - [NullAllowed, Export("onSubmitSuccess", ArgumentSemantic.Copy)] - Action> OnSubmitSuccess { get; set; } - - [NullAllowed, Export("onSubmitError", ArgumentSemantic.Copy)] - Action OnSubmitError { get; set; } - - // [NullAllowed, Export("configureTheme", ArgumentSemantic.Copy)] - // Action ConfigureTheme { get; set; } - // - // [Export("theme", ArgumentSemantic.Strong)] - // SentryUserFeedbackThemeConfiguration Theme { get; set; } - // - // [NullAllowed, Export("configureDarkTheme", ArgumentSemantic.Copy)] - // Action ConfigureDarkTheme { get; set; } - // - // [Export("darkTheme", ArgumentSemantic.Strong)] - // SentryUserFeedbackThemeConfiguration DarkTheme { get; set; } - - [Export("textEffectiveHeightCenter")] - nfloat TextEffectiveHeightCenter { get; set; } - - [Export("scaleFactor")] - nfloat ScaleFactor { get; set; } - - [Export("calculateScaleFactor")] - nfloat CalculateScaleFactor(); - - [Export("paddingScaleFactor")] - nfloat PaddingScaleFactor { get; set; } - - [Export("calculatePaddingScaleFactor")] - nfloat CalculatePaddingScaleFactor(); - - [Export("recalculateScaleFactors")] - void RecalculateScaleFactors(); - - [Export("padding")] - nfloat Padding { get; } - - [Export("spacing")] - nfloat Spacing { get; } - - [Export("margin")] - nfloat Margin { get; } - - [Export("init")] - [DesignatedInitializer] - IntPtr Constructor(); -} - -// [BaseType(typeof(NSObject), Name = "_TtC6Sentry37SentryUserFeedbackThemeConfiguration")] -// [DisableDefaultCtor] -// [Internal] -// interface SentryUserFeedbackThemeConfiguration -// { -// [Export("backgroundColor", ArgumentSemantic.Strong)] -// UIColor BackgroundColor { get; set; } -// -// [Export("textColor", ArgumentSemantic.Strong)] -// UIColor TextColor { get; set; } -// -// [Export("buttonColor", ArgumentSemantic.Strong)] -// UIColor ButtonColor { get; set; } -// -// [Export("buttonTextColor", ArgumentSemantic.Strong)] -// UIColor ButtonTextColor { get; set; } -// -// [Export("init")] -// [DesignatedInitializer] -// IntPtr Constructor(); -// } - -[BaseType(typeof(NSObject), Name = "_TtC6Sentry37SentryUserFeedbackWidgetConfiguration")] -[DisableDefaultCtor] -[Internal] -interface SentryUserFeedbackWidgetConfiguration -{ - [Export("autoInject")] - bool AutoInject { get; set; } - - [Export("defaultLabelText", ArgumentSemantic.Copy)] - string DefaultLabelText { get; } - - [NullAllowed, Export("labelText", ArgumentSemantic.Copy)] - string LabelText { get; set; } - - [Export("showIcon")] - bool ShowIcon { get; set; } - - [NullAllowed, Export("widgetAccessibilityLabel", ArgumentSemantic.Copy)] - string WidgetAccessibilityLabel { get; set; } - - [Export("windowLevel")] - nfloat WindowLevel { get; set; } - - [Export("location")] - NSDirectionalRectEdge Location { get; set; } - - [Export("layoutUIOffset")] - UIOffset LayoutUIOffset { get; set; } - - [Export("init")] - [DesignatedInitializer] - IntPtr Constructor(); -} - - -// [BaseType(typeof(NSObject), Name = "_TtC6Sentry37SentryUserFeedbackFormConfiguration")] -// [DisableDefaultCtor] -// [Internal] -// interface SentryUserFeedbackFormConfiguration -// { -// [Export("title", ArgumentSemantic.Copy)] -// string Title { get; set; } -// -// [Export("subtitle", ArgumentSemantic.Copy)] -// string Subtitle { get; set; } -// -// [Export("submitButtonTitle", ArgumentSemantic.Copy)] -// string SubmitButtonTitle { get; set; } -// -// [Export("cancelButtonTitle", ArgumentSemantic.Copy)] -// string CancelButtonTitle { get; set; } -// -// [Export("thankYouMessage", ArgumentSemantic.Copy)] -// string ThankYouMessage { get; set; } -// -// [Export("init")] -// [DesignatedInitializer] -// IntPtr Constructor(); -// } - -// @interface SentryViewScreenshotOptions : NSObject -[BaseType (typeof(NSObject), Name = "_TtC6Sentry27SentryViewScreenshotOptions")] -[Internal] -interface SentryViewScreenshotOptions //: ISentryRedactOptions -{ - // @property (nonatomic) BOOL enableViewRendererV2; - [Export ("enableViewRendererV2")] - bool EnableViewRendererV2 { get; set; } - - // @property (nonatomic) BOOL enableFastViewRendering; - [Export ("enableFastViewRendering")] - bool EnableFastViewRendering { get; set; } - - // @property (nonatomic) BOOL maskAllImages; - [Export ("maskAllImages")] - bool MaskAllImages { get; set; } - - // @property (nonatomic) BOOL maskAllText; - [Export ("maskAllText")] - bool MaskAllText { get; set; } - - // @property (copy, nonatomic) NSArray * _Nonnull maskedViewClasses; - [Export ("maskedViewClasses", ArgumentSemantic.Copy)] - Class[] MaskedViewClasses { get; set; } - - // @property (copy, nonatomic) NSArray * _Nonnull unmaskedViewClasses; - [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); -} - -// @protocol SentryViewScreenshotProvider -[Protocol (Name = "_TtP6Sentry28SentryViewScreenshotProvider_")] -[Model] -[BaseType (typeof(NSObject), Name = "_TtP6Sentry28SentryViewScreenshotProvider_")] -[Internal] -interface SentryViewScreenshotProvider -{ - // @required -(void)imageWithView:(UIView * _Nonnull)view onComplete:(void (^ _Nonnull)(UIImage * _Nonnull))onComplete; - [Abstract] - [Export ("imageWithView:onComplete:")] - void OnComplete (UIView view, Action onComplete); -} diff --git a/src/Sentry.Bindings.Cocoa/SwiftStructsAndEnums.cs b/src/Sentry.Bindings.Cocoa/SwiftStructsAndEnums.cs deleted file mode 100644 index 1453151744..0000000000 --- a/src/Sentry.Bindings.Cocoa/SwiftStructsAndEnums.cs +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file defines iOS API contracts for enums we need from Sentry-Swift.h. - * Note that we are **not** using Objective Sharpie to generate these contracts (instead they're maintained manually). - */ -using System.Runtime.InteropServices; -using Foundation; -using ObjCRuntime; -using Sentry; - -namespace Sentry.CocoaSdk; - -[Native] -internal enum SentryFeedbackSource : long -{ - Widget = 0, - Custom = 1 -} - -[Native] -internal enum SentryLevel : ulong -{ - None = 0, - Debug = 1, - Info = 2, - Warning = 3, - Error = 4, - Fatal = 5 -} - -[Native] -internal enum SentryStructuredLogLevel : long -{ - Trace = 0, - Debug = 1, - Info = 2, - Warn = 3, - Error = 4, - Fatal = 5 -} - -[Native] -internal enum SentryProfileLifecycle : long -{ - Manual = 0, - Trace = 1 -} - -[Native] -internal enum SentryReplayQuality : long -{ - Low = 0, - Medium = 1, - High = 2 -} - -[Native] -internal enum SentryReplayType : long -{ - Session = 0, - Buffer = 1 -} - -[Native] -internal enum SentryRRWebEventType : long -{ - None = 0, - Touch = 3, - Meta = 4, - Custom = 5 -} - -[Native] -internal enum SentrySessionStatus : ulong -{ - Ok = 0, - Exited = 1, - Crashed = 2, - Abnormal = 3 -} - -[Native] -internal enum SentryTransactionNameSource : long -{ - Custom = 0, - Url = 1, - Route = 2, - View = 3, - Component = 4, - Task = 5 -}