66
77using System ;
88using Foundation ;
9- using MetricKit ;
109using ObjCRuntime ;
11- using UIKit ;
1210
1311namespace Sentry . CocoaSdk ;
1412
@@ -30,6 +28,10 @@ namespace Sentry.CocoaSdk;
3028[ return : NullAllowed ]
3129delegate SentryEvent SentryBeforeSendEventCallback ( SentryEvent @event ) ;
3230
31+ // typedef id<SentrySpan> _Nullable (^SentryBeforeSendSpanCallback)(id<SentrySpan> _Nonnull);
32+ [ Internal ]
33+ delegate SentrySpan SentryBeforeSendSpanCallback ( SentrySpan span ) ;
34+
3335// typedef BOOL (^SentryBeforeCaptureScreenshotCallback)(SentryEvent * _Nonnull);
3436[ Internal ]
3537delegate bool SentryBeforeCaptureScreenshotCallback ( SentryEvent @event ) ;
@@ -1257,6 +1259,10 @@ interface SentryOptions
12571259 [ NullAllowed , Export ( "beforeSend" , ArgumentSemantic . Copy ) ]
12581260 SentryBeforeSendEventCallback BeforeSend { get ; set ; }
12591261
1262+ // @property (copy, nonatomic) SentryBeforeSendSpanCallback _Nullable beforeSendSpan;
1263+ [ NullAllowed , Export ( "beforeSendSpan" , ArgumentSemantic . Copy ) ]
1264+ SentryBeforeSendSpanCallback BeforeSendSpan { get ; set ; }
1265+
12601266 // @property (copy, nonatomic) SentryBeforeBreadcrumbCallback _Nullable beforeBreadcrumb;
12611267 [ NullAllowed , Export ( "beforeBreadcrumb" , ArgumentSemantic . Copy ) ]
12621268 SentryBeforeBreadcrumbCallback BeforeBreadcrumb { get ; set ; }
@@ -1702,6 +1708,16 @@ interface SentrySDK
17021708 [ Export ( "reportFullyDisplayed" ) ]
17031709 void ReportFullyDisplayed ( ) ;
17041710
1711+ // +(void)pauseAppHangTracking;
1712+ [ Static ]
1713+ [ Export ( "pauseAppHangTracking" ) ]
1714+ void PauseAppHangTracking ( ) ;
1715+
1716+ // +(void)resumeAppHangTracking;
1717+ [ Static ]
1718+ [ Export ( "resumeAppHangTracking" ) ]
1719+ void ResumeAppHangTracking ( ) ;
1720+
17051721 // +(void)flush:(NSTimeInterval)timeout __attribute__((swift_name("flush(timeout:)")));
17061722 [ Static ]
17071723 [ Export ( "flush:" ) ]
@@ -2022,8 +2038,8 @@ interface SentryUser : SentrySerializable
20222038 [ NullAllowed , Export ( "ipAddress" ) ]
20232039 string IpAddress { get ; set ; }
20242040
2025- // @property (copy, atomic) NSString * _Nullable segment;
2026- [ NullAllowed , Export ( "segment" ) ]
2041+ // @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."))) ;
2042+ [ Export ( "segment" ) ]
20272043 string Segment { get ; set ; }
20282044
20292045 // @property (copy, atomic) NSString * _Nullable name;
@@ -2078,52 +2094,6 @@ interface SentryUserFeedback : SentrySerializable
20782094 string Comments { get ; set ; }
20792095}
20802096
2081- // @interface SentryId : NSObject
2082- [ BaseType ( typeof ( NSObject ) , Name = "_TtC6Sentry8SentryId" ) ]
2083- [ Internal ]
2084- interface SentryId
2085- {
2086- // @property (nonatomic, strong, class) SentryId * _Nonnull empty;
2087- [ Static ]
2088- [ Export ( "empty" , ArgumentSemantic . Strong ) ]
2089- SentryId Empty { get ; set ; }
2090-
2091- // @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString;
2092- [ Export ( "sentryIdString" ) ]
2093- string SentryIdString { get ; }
2094-
2095- // -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer));
2096- [ Export ( "initWithUuid:" ) ]
2097- [ DesignatedInitializer ]
2098- NativeHandle Constructor ( NSUuid uuid ) ;
2099-
2100- // -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer));
2101- [ Export ( "initWithUUIDString:" ) ]
2102- [ DesignatedInitializer ]
2103- NativeHandle Constructor ( string uuidString ) ;
2104-
2105- // @property (readonly, nonatomic) NSUInteger hash;
2106- [ Export ( "hash" ) ]
2107- nuint Hash { get ; }
2108- }
2109-
2110- // @protocol SentryIntegrationProtocol <NSObject>
2111- [ Protocol ( Name = "_TtP6Sentry25SentryIntegrationProtocol_" ) ]
2112- [ BaseType ( typeof ( NSObject ) , Name = "_TtP6Sentry25SentryIntegrationProtocol_" ) ]
2113- [ Internal ]
2114- interface SentryIntegrationProtocol
2115- {
2116- // @required -(BOOL)installWithOptions:(SentryOptions * _Nonnull)options __attribute__((warn_unused_result("")));
2117- [ Abstract ]
2118- [ Export ( "installWithOptions:" ) ]
2119- bool InstallWithOptions ( SentryOptions options ) ;
2120-
2121- // @required -(void)uninstall;
2122- [ Abstract ]
2123- [ Export ( "uninstall" ) ]
2124- void Uninstall ( ) ;
2125- }
2126-
21272097// @interface SentryScreenFrames : NSObject <NSCopying>
21282098[ BaseType ( typeof ( NSObject ) ) ]
21292099[ DisableDefaultCtor ]
@@ -2259,20 +2229,10 @@ interface PrivateSentrySDKOnly
22592229 [ Export ( "captureViewHierarchy" ) ]
22602230 NSData CaptureViewHierarchy ( ) ;
22612231
2262- // +(NSDictionary<NSString *,id> * _Nullable)appStartMeasurementWithSpans;
2263- [ Static ]
2264- [ NullAllowed , Export ( "appStartMeasurementWithSpans" ) ]
2265- NSDictionary < NSString , NSObject > AppStartMeasurementWithSpans ( ) ;
2266-
2267- // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary;
2268- [ Static ]
2269- [ Export ( "userWithDictionary:" ) ]
2270- SentryUser UserWithDictionary ( NSDictionary dictionary ) ;
2271-
2272- // +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary;
2232+ // +(void)setCurrentScreen:(NSString * _Nonnull)screenName;
22732233 [ Static ]
2274- [ Export ( "breadcrumbWithDictionary :" ) ]
2275- SentryBreadcrumb BreadcrumbWithDictionary ( NSDictionary dictionary ) ;
2234+ [ Export ( "setCurrentScreen :" ) ]
2235+ void SetCurrentScreen ( string screenName ) ;
22762236
22772237 // +(void)captureReplay;
22782238 [ Static ]
@@ -2293,4 +2253,48 @@ interface PrivateSentrySDKOnly
22932253 [ Static ]
22942254 [ Export ( "addReplayRedactClasses:" ) ]
22952255 void AddReplayRedactClasses ( Class [ ] classes ) ;
2256+
2257+ // +(NSDictionary<NSString *,id> * _Nullable)appStartMeasurementWithSpans;
2258+ [ Static ]
2259+ [ NullAllowed , Export ( "appStartMeasurementWithSpans" ) ]
2260+ NSDictionary < NSString , NSObject > AppStartMeasurementWithSpans ( ) ;
2261+
2262+ // +(SentryUser * _Nonnull)userWithDictionary:(NSDictionary * _Nonnull)dictionary;
2263+ [ Static ]
2264+ [ Export ( "userWithDictionary:" ) ]
2265+ SentryUser UserWithDictionary ( NSDictionary dictionary ) ;
2266+
2267+ // +(SentryBreadcrumb * _Nonnull)breadcrumbWithDictionary:(NSDictionary * _Nonnull)dictionary;
2268+ [ Static ]
2269+ [ Export ( "breadcrumbWithDictionary:" ) ]
2270+ SentryBreadcrumb BreadcrumbWithDictionary ( NSDictionary dictionary ) ;
2271+ }
2272+
2273+ // @interface SentryId : NSObject
2274+ [ BaseType ( typeof ( NSObject ) , Name = "_TtC6Sentry8SentryId" ) ]
2275+ [ Internal ]
2276+ interface SentryId
2277+ {
2278+ // @property (nonatomic, strong, class) SentryId * _Nonnull empty;
2279+ [ Static ]
2280+ [ Export ( "empty" , ArgumentSemantic . Strong ) ]
2281+ SentryId Empty { get ; set ; }
2282+
2283+ // @property (readonly, copy, nonatomic) NSString * _Nonnull sentryIdString;
2284+ [ Export ( "sentryIdString" ) ]
2285+ string SentryIdString { get ; }
2286+
2287+ // -(instancetype _Nonnull)initWithUuid:(NSUUID * _Nonnull)uuid __attribute__((objc_designated_initializer));
2288+ [ Export ( "initWithUuid:" ) ]
2289+ [ DesignatedInitializer ]
2290+ NativeHandle Constructor ( NSUuid uuid ) ;
2291+
2292+ // -(instancetype _Nonnull)initWithUUIDString:(NSString * _Nonnull)uuidString __attribute__((objc_designated_initializer));
2293+ [ Export ( "initWithUUIDString:" ) ]
2294+ [ DesignatedInitializer ]
2295+ NativeHandle Constructor ( string uuidString ) ;
2296+
2297+ // @property (readonly, nonatomic) NSUInteger hash;
2298+ [ Export ( "hash" ) ]
2299+ nuint Hash { get ; }
22962300}
0 commit comments