@@ -31,6 +31,7 @@ var _isOnReportHandlerSet = false;
3131 */
3232const InstabugModule = {
3333 /**
34+ * @deprecated use {@link Instabug.start}
3435 * Starts the SDK.
3536 * This is the main SDK method that does all the magic. This is the only
3637 * method that SHOULD be called.
@@ -41,6 +42,20 @@ const InstabugModule = {
4142 * the SDK's UI.
4243 */
4344 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 ) {
4459 if ( Platform . OS === 'ios' ) Instabug . startWithToken ( token , invocationEvent ) ;
4560 } ,
4661
@@ -257,12 +272,23 @@ const InstabugModule = {
257272 } ,
258273
259274 /**
275+ * @deprecated use {@link Instabug.setString}
260276 * Overrides any of the strings shown in the SDK with custom ones.
261277 * Allows you to customize any of the strings shown to users in the SDK.
262278 * @param {string } string String value to override the default one.
263279 * @param {strings } key Key of string to override.
264280 */
265281 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 ) {
266292 Instabug . setString ( string , key ) ;
267293 } ,
268294
@@ -291,6 +317,7 @@ const InstabugModule = {
291317 } ,
292318
293319 /**
320+ * @deprecated use {@link Instabug.identifyUser}
294321 * Sets the default value of the user's email and hides the email field from the reporting UI
295322 * and set the user's name to be included with all reports.
296323 * It also reset the chats on device to that email and removes user attributes,
@@ -299,6 +326,18 @@ const InstabugModule = {
299326 * @param {string } name Name of the user to be set.
300327 */
301328 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 ) {
302341 if ( Platform . OS == 'ios' ) {
303342 Instabug . identifyUserWithEmail ( email , name ) ;
304343 } else if ( 'android' ) {
@@ -316,11 +355,21 @@ const InstabugModule = {
316355 } ,
317356
318357 /**
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.
320360 * Logged user events are going to be sent with each report, as well as at the end of a session.
321361 * @param {string } name Event name.
322362 */
323363 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 ) {
324373 Instabug . logUserEventWithName ( name ) ;
325374 } ,
326375
@@ -521,7 +570,6 @@ const InstabugModule = {
521570 * @param {function } onNewMessageHandler - A callback that gets
522571 * executed when a new message is received.
523572 */
524-
525573 setOnNewMessageHandler : function ( onNewMessageHandler ) {
526574 if ( Platform . OS === 'ios' ) {
527575 Instabug . addListener ( 'IBGonNewMessageHandler' ) ;
0 commit comments