@@ -1120,15 +1120,8 @@ class SentryId$1 extends objc.NSObject {
11201120 factory SentryId$1 () => new$ ();
11211121}
11221122
1123- late final _class_SentryFlutterPlugin = objc.getClass ("SentryFlutterPlugin" );
1124- late final _sel_getDisplayRefreshRate =
1125- objc.registerName ("getDisplayRefreshRate" );
1126- late final _sel_fetchNativeAppStartAsBytes =
1127- objc.registerName ("fetchNativeAppStartAsBytes" );
1128- late final _sel_loadContextsAsBytes = objc.registerName ("loadContextsAsBytes" );
1129- late final _sel_loadDebugImagesAsBytes_ =
1130- objc.registerName ("loadDebugImagesAsBytes:" );
1131- late final _sel_nativeCrash = objc.registerName ("nativeCrash" );
1123+ late final _class_SentrySDK = objc.getClass ("Sentry.SentrySDK" );
1124+ late final _sel_crash = objc.registerName ("crash" );
11321125final _objc_msgSend_1pl9qdv = objc.msgSendPointer
11331126 .cast<
11341127 ffi.NativeFunction <
@@ -1142,6 +1135,59 @@ late final _sel_pauseAppHangTracking =
11421135late final _sel_resumeAppHangTracking =
11431136 objc.registerName ("resumeAppHangTracking" );
11441137
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+
1182+ late final _class_SentryFlutterPlugin = objc.getClass ("SentryFlutterPlugin" );
1183+ late final _sel_getDisplayRefreshRate =
1184+ objc.registerName ("getDisplayRefreshRate" );
1185+ late final _sel_fetchNativeAppStartAsBytes =
1186+ objc.registerName ("fetchNativeAppStartAsBytes" );
1187+ late final _sel_loadContextsAsBytes = objc.registerName ("loadContextsAsBytes" );
1188+ late final _sel_loadDebugImagesAsBytes_ =
1189+ objc.registerName ("loadDebugImagesAsBytes:" );
1190+
11451191/// SentryFlutterPlugin
11461192class SentryFlutterPlugin extends objc.NSObject {
11471193 SentryFlutterPlugin ._(ffi.Pointer <objc.ObjCObject > pointer,
@@ -1199,23 +1245,6 @@ class SentryFlutterPlugin extends objc.NSObject {
11991245 : objc.NSData .castFromPointer (_ret, retain: true , release: true );
12001246 }
12011247
1202- /// nativeCrash
1203- static void nativeCrash () {
1204- _objc_msgSend_1pl9qdv (_class_SentryFlutterPlugin, _sel_nativeCrash);
1205- }
1206-
1207- /// pauseAppHangTracking
1208- static void pauseAppHangTracking () {
1209- _objc_msgSend_1pl9qdv (
1210- _class_SentryFlutterPlugin, _sel_pauseAppHangTracking);
1211- }
1212-
1213- /// resumeAppHangTracking
1214- static void resumeAppHangTracking () {
1215- _objc_msgSend_1pl9qdv (
1216- _class_SentryFlutterPlugin, _sel_resumeAppHangTracking);
1217- }
1218-
12191248 /// init
12201249 SentryFlutterPlugin init () {
12211250 objc.checkOsVersionInternal ('SentryFlutterPlugin.init' ,
0 commit comments