@@ -36,54 +36,33 @@ - (id) init
36
36
return self;
37
37
}
38
38
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.
42
40
RCT_EXPORT_METHOD (ibgSleep) {
43
41
[NSThread sleepForTimeInterval: 3 .0f ];
44
42
}
45
43
46
44
// 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.
54
45
RCT_EXPORT_METHOD (setEnabled:(BOOL )isEnabled) {
55
46
IBGAPM.enabled = isEnabled;
56
47
}
57
48
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.
62
50
RCT_EXPORT_METHOD (setAppLaunchEnabled:(BOOL )isEnabled) {
63
51
IBGAPM.coldAppLaunchEnabled = isEnabled;
64
52
}
65
53
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.
70
55
RCT_EXPORT_METHOD (endAppLaunch) {
71
56
[IBGAPM endAppLaunch ];
72
57
}
73
58
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.
81
60
RCT_EXPORT_METHOD (setAutoUITraceEnabled:(BOOL )isEnabled) {
82
61
IBGAPM.autoUITraceEnabled = isEnabled;
83
62
}
84
63
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
+ //
87
66
// Deprecated see [startFlow: (NSString *)name]
88
67
RCT_EXPORT_METHOD (startExecutionTrace:(NSString *)name :(NSString *)id
89
68
:(RCTPromiseResolveBlock)resolve
@@ -97,7 +76,8 @@ - (id) init
97
76
}
98
77
}
99
78
100
- // This method is exporting a function to be accessible from JavaScript side.
79
+ // Sets a user defined attribute for the execution trace.
80
+ //
101
81
// Deprecated see [setFlowAttribute:(NSString *)name :(NSString *)key :(NSString *_Nullable)value]
102
82
RCT_EXPORT_METHOD (setExecutionTraceAttribute:(NSString *)id :(NSString *)key :(NSString *)value) {
103
83
IBGExecutionTrace *trace = [traces objectForKey: id ];
@@ -106,8 +86,8 @@ - (id) init
106
86
}
107
87
}
108
88
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
+ //
111
91
// Deprecated see [endFlow: (NSString *)name]
112
92
RCT_EXPORT_METHOD (endExecutionTrace:(NSString *)id) {
113
93
IBGExecutionTrace *trace = [traces objectForKey: id ];
@@ -116,45 +96,30 @@ - (id) init
116
96
}
117
97
}
118
98
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`,
123
100
// allowing the SDK to capture and analyze the flow of execution within the application.
124
101
RCT_EXPORT_METHOD (startFlow: (NSString *)name) {
125
102
[IBGAPM startFlowWithName: name];
126
103
}
127
104
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`.
133
106
RCT_EXPORT_METHOD (endFlow: (NSString *)name) {
134
107
[IBGAPM endFlowWithName: name];
135
108
}
136
109
137
110
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.
142
112
RCT_EXPORT_METHOD (setFlowAttribute:(NSString *)name :(NSString *)key :(NSString *_Nullable)value) {
143
113
[IBGAPM setAttributeForFlowWithName: name key: key value: value];
144
114
}
145
115
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.
150
118
RCT_EXPORT_METHOD (startUITrace:(NSString *)name) {
151
119
[IBGAPM startUITraceWithName: name];
152
120
}
153
121
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.
158
123
RCT_EXPORT_METHOD (endUITrace) {
159
124
[IBGAPM endUITrace ];
160
125
}
0 commit comments