@@ -36,54 +36,33 @@ - (id) init
3636 return self;
3737}
3838
39- // This method is exporting a method
40- // named `ibgSleep` to be accessible from JavaScript side. When this method is
41- // called from JavaScript, it (sleeps) the current thread for 3 seconds.
39+ // Pauses the current thread for 3 seconds.
4240RCT_EXPORT_METHOD (ibgSleep) {
4341 [NSThread sleepForTimeInterval: 3 .0f ];
4442}
4543
4644// Enables or disables APM.
47- //
48- // This function is exporting a method named
49- // `setEnabled` to be accessible from JavaScript side. When this method is
50- // called from JavaScript, it will set the `enabled` property of the `IBGAPM` class provided by the
51- // Instabug SDK to the value passed as the `isEnabled` parameter. This property controls whether the
52- // APM (Application Performance Monitoring) feature of Instabug is enabled or disabled based on the
53- // boolean value passed to it.
5445RCT_EXPORT_METHOD (setEnabled:(BOOL )isEnabled) {
5546 IBGAPM.enabled = isEnabled;
5647}
5748
58- // This function is exporting a method named
59- // `setAppLaunchEnabled` to be accessible from JavaScript side. When this
60- // method is called from JavaScript, it will set the `coldAppLaunchEnabled` property of the `IBGAPM`
61- // class provided by the Instabug SDK to the value passed as the `isEnabled` parameter.
49+ // Determines either coldAppLaunch is enabled or not.
6250RCT_EXPORT_METHOD (setAppLaunchEnabled:(BOOL )isEnabled) {
6351 IBGAPM.coldAppLaunchEnabled = isEnabled;
6452}
6553
66- // This function is exporting a method named `endAppLaunch` to be
67- // accessible from JavaScript side. When this method is called from
68- // JavaScript, it will invoke the `endAppLaunch` method from the `IBGAPM` class provided by the
69- // Instabug SDK. This method is used to signal the end of the app launch process.
54+ // This method is used to signal the end of the app launch process.
7055RCT_EXPORT_METHOD (endAppLaunch) {
7156 [IBGAPM endAppLaunch ];
7257}
7358
74- // This function is exporting a method named
75- // `setAutoUITraceEnabled` to be accessible from JavaScript side. When this
76- // method is called from JavaScript, it will set the `autoUITraceEnabled` property of the `IBGAPM`
77- // class provided by the Instabug SDK to the value passed as the `isEnabled` parameter. This property
78- // controls whether automatic tracing of UI interactions is enabled or disabled within the SDK. By
79- // toggling this property, you can control whether the SDK captures data related to user interface
80- // performance and behavior automatically.
59+ // Controls whether automatic tracing of UI interactions is enabled or disabled within the SDK.
8160RCT_EXPORT_METHOD (setAutoUITraceEnabled:(BOOL )isEnabled) {
8261 IBGAPM.autoUITraceEnabled = isEnabled;
8362}
8463
85- // This method `startExecutionTrace` is exporting a function to be accessible from JavaScript in a
86- // React Native application.
64+ // Starts new execution trace with the specified `name`.
65+ //
8766// Deprecated see [startFlow: (NSString *)name]
8867RCT_EXPORT_METHOD (startExecutionTrace:(NSString *)name :(NSString *)id
8968 :(RCTPromiseResolveBlock)resolve
@@ -97,7 +76,8 @@ - (id) init
9776 }
9877}
9978
100- // This method is exporting a function to be accessible from JavaScript side.
79+ // Sets a user defined attribute for the execution trace.
80+ //
10181// Deprecated see [setFlowAttribute:(NSString *)name :(NSString *)key :(NSString *_Nullable)value]
10282RCT_EXPORT_METHOD (setExecutionTraceAttribute:(NSString *)id :(NSString *)key :(NSString *)value) {
10383 IBGExecutionTrace *trace = [traces objectForKey: id ];
@@ -106,8 +86,8 @@ - (id) init
10686 }
10787}
10888
109- // This function is exporting a method named
110- // `endExecutionTrace` to be accessible from JavaScript side.
89+ // Ends execution trace with the specified `name`.
90+ //
11191// Deprecated see [endFlow: (NSString *)name]
11292RCT_EXPORT_METHOD (endExecutionTrace:(NSString *)id) {
11393 IBGExecutionTrace *trace = [traces objectForKey: id ];
@@ -116,45 +96,30 @@ - (id) init
11696 }
11797}
11898
119- // This function is exporting a method named
120- // `startFlow` to be accessible from JavaScript side. When this method is
121- // called from JavaScript, it will invoke the `startFlowWithName:` method from the `IBGAPM` class
122- // provided by the Instabug SDK. This method is used to start a flow trace with the specified name,
99+ // Starts a flow trace with the specified `name`,
123100// allowing the SDK to capture and analyze the flow of execution within the application.
124101RCT_EXPORT_METHOD (startFlow: (NSString *)name) {
125102 [IBGAPM startFlowWithName: name];
126103}
127104
128- // This function is exporting a method named `endFlow` to
129- // be accessible from JavaScript side. When this method is called from
130- // JavaScript, it will invoke the `endFlowWithName:` method from the `IBGAPM` class provided by the
131- // Instabug SDK. This method is used to end a flow trace with the specified name, allowing the SDK to
132- // capture and analyze the flow of execution within the application.
105+ // Ends a flow with the specified `name`.
133106RCT_EXPORT_METHOD (endFlow: (NSString *)name) {
134107 [IBGAPM endFlowWithName: name];
135108}
136109
137110
138- // The function is exporting a method named `setFlowAttribute` to be accessible from
139- // JavaScript side. When this method is
140- // called from JavaScript, it will invoke the `setAttributeForFlowWithName:` method from the `IBGAPM` class
141- // provided by the Instabug SDK to set a user defined attribute for the currently active flow.
111+ // Sets a user defined attribute for the currently active flow.
142112RCT_EXPORT_METHOD (setFlowAttribute:(NSString *)name :(NSString *)key :(NSString *_Nullable)value) {
143113 [IBGAPM setAttributeForFlowWithName: name key: key value: value];
144114}
145115
146- // This function is exporting a method named
147- // `startUITrace` to be accessible from JavaScript side. When this method is
148- // called from JavaScript, it will invoke the `startUITraceWithName:` method from the `IBGAPM` class
149- // provided by the Instabug SDK to start a new UI trace.
116+ // Starts a new `UITrace` with the provided `name` parameter,
117+ // allowing the SDK to capture and analyze the UI components within the application.
150118RCT_EXPORT_METHOD (startUITrace:(NSString *)name) {
151119 [IBGAPM startUITraceWithName: name];
152120}
153121
154- // This function is exporting a method named `endUITrace` to be
155- // accessible from JavaScript side. When this method is called from
156- // JavaScript, it will invoke the `endUITrace` method from the `IBGAPM` class provided by the Instabug
157- // SDK. This method is used to terminate the currently active UI trace.
122+ // Terminates the currently active UI trace.
158123RCT_EXPORT_METHOD (endUITrace) {
159124 [IBGAPM endUITrace ];
160125}
0 commit comments