@@ -9,21 +9,17 @@ import { NativeModules, NativeAppEventEmitter, Platform } from 'react-native';
99let { Instabug} = NativeModules ;
1010
1111module . exports = {
12- /**
12+ /**
1313 * Starts the SDK.
1414 * This is the main SDK method that does all the magic. This is the only
1515 * method that SHOULD be called.
1616 * Should be called in constructor of the app registery component
17- * @param {string } androidToken The token that identifies the app, you can find
17+ * @param {string } Token The token that identifies the app, you can find
1818 * it on your dashboard.
19- * @param {string } iosToken The token that identifies the app, you can find
20- * it on your dashboard.
21- * @param {constants.invocationEvent } invocationEvent The event that invokes
22- * the SDK's UI.
2319 */
24- startWithToken : function ( androidToken , iosToken , invocationEvent ) {
20+ startWithToken : function ( token ) {
2521 if ( Platform . OS === 'ios' ) {
26- Instabug . startWithToken ( iosToken , invocationEvent ) ;
22+ Instabug . startWithToken ( iosToken , Instabug . constants . invocationEvent . floatingButton ) ;
2723
2824 } else {
2925
@@ -33,7 +29,7 @@ module.exports = {
3329
3430
3531 } ,
36- /**
32+ /**
3733 * Starts the SDK.
3834 * This is the main SDK method that does all the magic. This is the only
3935 * method that SHOULD be called.
@@ -53,6 +49,30 @@ module.exports = {
5349 }
5450
5551
52+ } ,
53+ /**
54+ * Starts the SDK.
55+ * This is the main SDK method that does all the magic. This is the only
56+ * method that SHOULD be called.
57+ * Should be called in constructor of the app registery component
58+ * @param {string } androidToken The token that identifies the app, you can find
59+ * it on your dashboard.
60+ * @param {string } iosToken The token that identifies the app, you can find
61+ * it on your dashboard.
62+ * @param {constants.invocationEvent } invocationEvent The event that invokes
63+ * the SDK's UI.
64+ */
65+ startWithToken : function ( androidToken , iosToken , invocationEvent ) {
66+ if ( Platform . OS === 'ios' ) {
67+ Instabug . startWithToken ( iosToken , invocationEvent ) ;
68+
69+ } else {
70+
71+ Instabug . startInstabugWithTokenForAndroid ( androidToken ) ;
72+
73+ }
74+
75+
5676 } ,
5777
5878 /**
0 commit comments