@@ -1120,6 +1120,65 @@ class SentryId$1 extends objc.NSObject {
11201120 factory SentryId$1 () => new$ ();
11211121}
11221122
1123+ late final _class_SentrySDK = objc.getClass ("Sentry.SentrySDK" );
1124+ late final _sel_crash = objc.registerName ("crash" );
1125+ final _objc_msgSend_1pl9qdv = objc.msgSendPointer
1126+ .cast<
1127+ ffi.NativeFunction <
1128+ ffi.Void Function (ffi.Pointer <objc.ObjCObject >,
1129+ ffi.Pointer <objc.ObjCSelector >)>> ()
1130+ .asFunction<
1131+ void Function (
1132+ ffi.Pointer <objc.ObjCObject >, ffi.Pointer <objc.ObjCSelector >)> ();
1133+ late final _sel_pauseAppHangTracking =
1134+ objc.registerName ("pauseAppHangTracking" );
1135+ late final _sel_resumeAppHangTracking =
1136+ objc.registerName ("resumeAppHangTracking" );
1137+
1138+ /// The main entry point for the Sentry SDK.
1139+ /// We recommend using <code>start(configureOptions:)</code> to initialize Sentry.
1140+ class SentrySDK extends objc.NSObject {
1141+ SentrySDK ._(ffi.Pointer <objc.ObjCObject > pointer,
1142+ {bool retain = false , bool release = false })
1143+ : super .castFromPointer (pointer, retain: retain, release: release);
1144+
1145+ /// Constructs a [SentrySDK] that points to the same underlying object as [other] .
1146+ SentrySDK .castFrom (objc.ObjCObjectBase other)
1147+ : this ._(other.ref.pointer, retain: true , release: true );
1148+
1149+ /// Constructs a [SentrySDK] that wraps the given raw object pointer.
1150+ SentrySDK .castFromPointer (ffi.Pointer <objc.ObjCObject > other,
1151+ {bool retain = false , bool release = false })
1152+ : this ._(other, retain: retain, release: release);
1153+
1154+ /// Returns whether [obj] is an instance of [SentrySDK] .
1155+ static bool isInstance (objc.ObjCObjectBase obj) {
1156+ return _objc_msgSend_19nvye5 (
1157+ obj.ref.pointer, _sel_isKindOfClass_, _class_SentrySDK);
1158+ }
1159+
1160+ /// This forces a crash, useful to test the <code>SentryCrash</code> integration.
1161+ /// note:
1162+ /// The SDK can’t report a crash when a debugger is attached. Your application needs to run
1163+ /// without a debugger attached to capture the crash and send it to Sentry the next time you launch
1164+ /// your application.
1165+ static void crash () {
1166+ _objc_msgSend_1pl9qdv (_class_SentrySDK, _sel_crash);
1167+ }
1168+
1169+ /// Pauses sending detected app hangs to Sentry.
1170+ /// This method doesn’t close the detection of app hangs. Instead, the app hang detection
1171+ /// will ignore detected app hangs until you call <code>resumeAppHangTracking</code>.
1172+ static void pauseAppHangTracking () {
1173+ _objc_msgSend_1pl9qdv (_class_SentrySDK, _sel_pauseAppHangTracking);
1174+ }
1175+
1176+ /// Resumes sending detected app hangs to Sentry.
1177+ static void resumeAppHangTracking () {
1178+ _objc_msgSend_1pl9qdv (_class_SentrySDK, _sel_resumeAppHangTracking);
1179+ }
1180+ }
1181+
11231182late final _class_SentryFlutterPlugin = objc.getClass ("SentryFlutterPlugin" );
11241183late final _sel_getDisplayRefreshRate =
11251184 objc.registerName ("getDisplayRefreshRate" );
0 commit comments