File tree Expand file tree Collapse file tree 5 files changed +42
-5
lines changed
ios/InstabugSample.xcodeproj Expand file tree Collapse file tree 5 files changed +42
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,14 @@ export default class InstabugSample extends Component {
27
27
28
28
constructor ( props ) {
29
29
super ( props ) ;
30
- Instabug . startWithToken ( '0f0dc916bd9175e3b5d2fdf0cfa49a69' , Instabug . invocationEvent . shake ) ;
30
+
31
+ Instabug . isRunningLive ( function ( isLive ) {
32
+ if ( isLive ) {
33
+ Instabug . startWithToken ( 'LIVE_TOKEN' , Instabug . invocationEvent . shake ) ;
34
+ } else {
35
+ Instabug . startWithToken ( 'BETA_TOKEN' , Instabug . invocationEvent . shake ) ;
36
+ }
37
+ } ) ;
31
38
32
39
const ds = new ListView . DataSource ( { rowHasChanged : ( r1 , r2 ) => r1 !== r2 } ) ;
33
40
this . state = {
Original file line number Diff line number Diff line change 442
442
24ED9F161EFA6BE300D771DA /* Recovered References */ = {
443
443
isa = PBXGroup;
444
444
children = (
445
+ 5632439F28464ECB86D23318 /* libRNInstabug.a */,
445
446
);
446
447
name = "Recovered References";
447
448
sourceTree = "<group>";
Original file line number Diff line number Diff line change @@ -712,9 +712,9 @@ module.exports = {
712
712
* none is enabled, Bug
713
713
* reporting becomes the default invocation option.
714
714
*
715
- * @param {boolean } chat weather Talk to us is enable or not
716
- * @param {boolean } bug weather Report a Problem is enable or not
717
- * @param {boolean } feedback weather General Feedback is enable or not
715
+ * @param {boolean } chat whether Talk to us is enable or not
716
+ * @param {boolean } bug whether Report a Problem is enable or not
717
+ * @param {boolean } feedback whether General Feedback is enable or not
718
718
* */
719
719
setPromptOptionsEnabled : function ( chat , bug , feedback ) {
720
720
Instabug . setPromptOptionsEnabled ( chat , bug , feedback ) ;
@@ -740,6 +740,19 @@ module.exports = {
740
740
}
741
741
} ,
742
742
743
+ /**
744
+ * @summary Checks whether app is development/Beta testing OR live
745
+ * Note: This API is iOS only
746
+ * It returns in the callback false if in development or beta testing on Test Flight, and true if app is live on the
747
+ * app store.
748
+ * @param {function } runningLiveCallBack callback with argument as return value 'isLive'
749
+ */
750
+ isRunningLive : function ( runningLiveCallBack ) {
751
+ if ( Platform . OS === 'ios' ) {
752
+ Instabug . isRunningLive ( runningLiveCallBack )
753
+ }
754
+ } ,
755
+
743
756
/**
744
757
* The event used to invoke the feedback form
745
758
* @readonly
Original file line number Diff line number Diff line change @@ -326,6 +326,22 @@ - (dispatch_queue_t)methodQueue {
326
326
[Instabug setViewHierarchyEnabled: viewHirearchyEnabled];
327
327
}
328
328
329
+ RCT_EXPORT_METHOD (isRunningLive:(RCTResponseSenderBlock)callback) {
330
+ BOOL result = NO ;
331
+ #if TARGET_OS_SIMULATOR
332
+ result = NO ;
333
+ #else
334
+ BOOL isRunningTestFlightBeta = [[[[NSBundle mainBundle ] appStoreReceiptURL ] lastPathComponent ] isEqualToString: @" sandboxReceipt" ];
335
+ BOOL hasEmbeddedMobileProvision = !![[NSBundle mainBundle ] pathForResource: @" embedded" ofType: @" mobileprovision" ];
336
+ if (isRunningTestFlightBeta || hasEmbeddedMobileProvision)
337
+ {
338
+ result = NO ;
339
+ }
340
+ result = YES ;
341
+ #endif
342
+ callback (@[[NSNumber numberWithBool: result]]);
343
+ }
344
+
329
345
- (NSDictionary *)constantsToExport
330
346
{
331
347
return @{ @" invocationEventNone" : @(IBGInvocationEventNone),
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " instabug-reactnative" ,
3
- "version" : " 1.1.2 " ,
3
+ "version" : " 1.1.3 " ,
4
4
"description" : " React Native plugin for integrating the Instabug SDK" ,
5
5
"main" : " index.js" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments