@@ -31,6 +31,7 @@ var _isOnReportHandlerSet = false;
31
31
*/
32
32
const InstabugModule = {
33
33
/**
34
+ * @deprecated use {@link Instabug.start}
34
35
* Starts the SDK.
35
36
* This is the main SDK method that does all the magic. This is the only
36
37
* method that SHOULD be called.
@@ -41,6 +42,20 @@ const InstabugModule = {
41
42
* the SDK's UI.
42
43
*/
43
44
startWithToken : function ( token , invocationEvent ) {
45
+ this . start ( token , invocationEvent ) ;
46
+ } ,
47
+
48
+ /**
49
+ * Starts the SDK.
50
+ * This is the main SDK method that does all the magic. This is the only
51
+ * method that SHOULD be called.
52
+ * Should be called in constructor of the app registery component
53
+ * @param {string } token The token that identifies the app, you can find
54
+ * it on your dashboard.
55
+ * @param {invocationEvent } invocationEvent The event that invokes
56
+ * the SDK's UI.
57
+ */
58
+ start : function ( token , invocationEvent ) {
44
59
if ( Platform . OS === 'ios' ) Instabug . startWithToken ( token , invocationEvent ) ;
45
60
} ,
46
61
@@ -257,12 +272,23 @@ const InstabugModule = {
257
272
} ,
258
273
259
274
/**
275
+ * @deprecated use {@link Instabug.setString}
260
276
* Overrides any of the strings shown in the SDK with custom ones.
261
277
* Allows you to customize any of the strings shown to users in the SDK.
262
278
* @param {string } string String value to override the default one.
263
279
* @param {strings } key Key of string to override.
264
280
*/
265
281
setStringToKey : function ( string , key ) {
282
+ this . setString ( key , string ) ;
283
+ } ,
284
+
285
+ /**
286
+ * Overrides any of the strings shown in the SDK with custom ones.
287
+ * Allows you to customize any of the strings shown to users in the SDK.
288
+ * @param {string } string String value to override the default one.
289
+ * @param {strings } key Key of string to override.
290
+ */
291
+ setString : function ( key , string ) {
266
292
Instabug . setString ( string , key ) ;
267
293
} ,
268
294
@@ -291,6 +317,7 @@ const InstabugModule = {
291
317
} ,
292
318
293
319
/**
320
+ * @deprecated use {@link Instabug.identifyUser}
294
321
* Sets the default value of the user's email and hides the email field from the reporting UI
295
322
* and set the user's name to be included with all reports.
296
323
* It also reset the chats on device to that email and removes user attributes,
@@ -299,6 +326,18 @@ const InstabugModule = {
299
326
* @param {string } name Name of the user to be set.
300
327
*/
301
328
identifyUserWithEmail : function ( email , name ) {
329
+ this . identifyUser ( email , name ) ;
330
+ } ,
331
+
332
+ /**
333
+ * Sets the default value of the user's email and hides the email field from the reporting UI
334
+ * and set the user's name to be included with all reports.
335
+ * It also reset the chats on device to that email and removes user attributes,
336
+ * user data and completed surveys.
337
+ * @param {string } email Email address to be set as the user's email.
338
+ * @param {string } name Name of the user to be set.
339
+ */
340
+ identifyUser : function ( email , name ) {
302
341
if ( Platform . OS == 'ios' ) {
303
342
Instabug . identifyUserWithEmail ( email , name ) ;
304
343
} else if ( 'android' ) {
@@ -316,11 +355,21 @@ const InstabugModule = {
316
355
} ,
317
356
318
357
/**
319
- * @deprecated Logs a user event that happens through the lifecycle of the application.
358
+ * @deprecated use {@link Instabug.logUserEvent}
359
+ * Logs a user event that happens through the lifecycle of the application.
320
360
* Logged user events are going to be sent with each report, as well as at the end of a session.
321
361
* @param {string } name Event name.
322
362
*/
323
363
logUserEventWithName : function ( name ) {
364
+ this . logUserEvent ( name ) ;
365
+ } ,
366
+
367
+ /**
368
+ * Logs a user event that happens through the lifecycle of the application.
369
+ * Logged user events are going to be sent with each report, as well as at the end of a session.
370
+ * @param {string } name Event name.
371
+ */
372
+ logUserEvent : function ( name ) {
324
373
Instabug . logUserEventWithName ( name ) ;
325
374
} ,
326
375
@@ -521,7 +570,6 @@ const InstabugModule = {
521
570
* @param {function } onNewMessageHandler - A callback that gets
522
571
* executed when a new message is received.
523
572
*/
524
-
525
573
setOnNewMessageHandler : function ( onNewMessageHandler ) {
526
574
if ( Platform . OS === 'ios' ) {
527
575
Instabug . addListener ( 'IBGonNewMessageHandler' ) ;
0 commit comments