Skip to content
This repository was archived by the owner on Sep 14, 2020. It is now read-only.

Commit 16da5e8

Browse files
Merge pull request #212 from bugsnag/fix-client-session-start
Add missing param to client method
2 parents 9c54fc3 + f27bbe6 commit 16da5e8

2 files changed

Lines changed: 106 additions & 6 deletions

File tree

android/src/main/java/com/bugsnag/BugsnagReactNative.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.facebook.react.uimanager.ViewManager;
2626

2727
import android.content.Context;
28+
import android.app.Activity;
2829

2930
import com.bugsnag.android.*;
3031

@@ -262,7 +263,11 @@ private void configureRuntimeOptions(Client client, ReadableMap options) {
262263
if (options.hasKey("autoCaptureSessions")) {
263264
boolean autoCapture = options.getBoolean("autoCaptureSessions");
264265
config.setAutoCaptureSessions(autoCapture);
265-
client.startFirstSession();
266+
Activity activity = getCurrentActivity();
267+
268+
if (activity != null) {
269+
client.startFirstSession(getCurrentActivity());
270+
}
266271
}
267272
}
268273
}

examples/plain/ios/BugsnagReactNativeExample.xcodeproj/project.pbxproj

Lines changed: 100 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
3333
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
3434
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
35-
2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */; };
35+
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
3636
2DCD954D1E0B4F2C00145EB5 /* BugsnagReactNativeExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BugsnagReactNativeExampleTests.m */; };
3737
348547A9B452443DA8E0786E /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AC31314F22BC4AE39D3FB949 /* Entypo.ttf */; };
3838
37DAB24AE5434E61A8708C6F /* libBugsnagReactNative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31124543911F4AADA5E4DCD3 /* libBugsnagReactNative.a */; };
@@ -285,6 +285,48 @@
285285
remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
286286
remoteInfo = RCTBlob;
287287
};
288+
E766475E20208BBA0037E950 /* PBXContainerItemProxy */ = {
289+
isa = PBXContainerItemProxy;
290+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
291+
proxyType = 2;
292+
remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
293+
remoteInfo = "third-party";
294+
};
295+
E766476020208BBA0037E950 /* PBXContainerItemProxy */ = {
296+
isa = PBXContainerItemProxy;
297+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
298+
proxyType = 2;
299+
remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
300+
remoteInfo = "third-party-tvOS";
301+
};
302+
E766476220208BBA0037E950 /* PBXContainerItemProxy */ = {
303+
isa = PBXContainerItemProxy;
304+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
305+
proxyType = 2;
306+
remoteGlobalIDString = 139D7E881E25C6D100323FB7;
307+
remoteInfo = "double-conversion";
308+
};
309+
E766476420208BBA0037E950 /* PBXContainerItemProxy */ = {
310+
isa = PBXContainerItemProxy;
311+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
312+
proxyType = 2;
313+
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
314+
remoteInfo = "double-conversion-tvOS";
315+
};
316+
E766476620208BBA0037E950 /* PBXContainerItemProxy */ = {
317+
isa = PBXContainerItemProxy;
318+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
319+
proxyType = 2;
320+
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
321+
remoteInfo = privatedata;
322+
};
323+
E766476820208BBA0037E950 /* PBXContainerItemProxy */ = {
324+
isa = PBXContainerItemProxy;
325+
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
326+
proxyType = 2;
327+
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
328+
remoteInfo = "privatedata-tvOS";
329+
};
288330
/* End PBXContainerItemProxy section */
289331

290332
/* Begin PBXFileReference section */
@@ -369,7 +411,7 @@
369411
isa = PBXFrameworksBuildPhase;
370412
buildActionMask = 2147483647;
371413
files = (
372-
2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */,
414+
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
373415
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
374416
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
375417
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
@@ -489,13 +531,19 @@
489531
isa = PBXGroup;
490532
children = (
491533
146834041AC3E56700842450 /* libReact.a */,
534+
3DAD3EA31DF850E9000B6D8A /* libReact.a */,
492535
3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
493536
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
494537
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
495538
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
496539
3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
497540
3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
498-
3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */,
541+
E766475F20208BBA0037E950 /* libthird-party.a */,
542+
E766476120208BBA0037E950 /* libthird-party.a */,
543+
E766476320208BBA0037E950 /* libdouble-conversion.a */,
544+
E766476520208BBA0037E950 /* libdouble-conversion.a */,
545+
E766476720208BBA0037E950 /* libprivatedata.a */,
546+
E766476920208BBA0037E950 /* libprivatedata-tvOS.a */,
499547
);
500548
name = Products;
501549
sourceTree = "<group>";
@@ -732,6 +780,7 @@
732780
TestTargetID = 13B07F861A680F5B00A75B9A;
733781
};
734782
13B07F861A680F5B00A75B9A = {
783+
DevelopmentTeam = 372ZUL2ZB7;
735784
LastSwiftMigration = "";
736785
};
737786
2D02E47A1E0B4A5D006451C7 = {
@@ -923,10 +972,10 @@
923972
remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
924973
sourceTree = BUILT_PRODUCTS_DIR;
925974
};
926-
3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = {
975+
3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
927976
isa = PBXReferenceProxy;
928977
fileType = archive.ar;
929-
path = "libReact-tvOS.a";
978+
path = libReact.a;
930979
remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
931980
sourceTree = BUILT_PRODUCTS_DIR;
932981
};
@@ -1042,6 +1091,48 @@
10421091
remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
10431092
sourceTree = BUILT_PRODUCTS_DIR;
10441093
};
1094+
E766475F20208BBA0037E950 /* libthird-party.a */ = {
1095+
isa = PBXReferenceProxy;
1096+
fileType = archive.ar;
1097+
path = "libthird-party.a";
1098+
remoteRef = E766475E20208BBA0037E950 /* PBXContainerItemProxy */;
1099+
sourceTree = BUILT_PRODUCTS_DIR;
1100+
};
1101+
E766476120208BBA0037E950 /* libthird-party.a */ = {
1102+
isa = PBXReferenceProxy;
1103+
fileType = archive.ar;
1104+
path = "libthird-party.a";
1105+
remoteRef = E766476020208BBA0037E950 /* PBXContainerItemProxy */;
1106+
sourceTree = BUILT_PRODUCTS_DIR;
1107+
};
1108+
E766476320208BBA0037E950 /* libdouble-conversion.a */ = {
1109+
isa = PBXReferenceProxy;
1110+
fileType = archive.ar;
1111+
path = "libdouble-conversion.a";
1112+
remoteRef = E766476220208BBA0037E950 /* PBXContainerItemProxy */;
1113+
sourceTree = BUILT_PRODUCTS_DIR;
1114+
};
1115+
E766476520208BBA0037E950 /* libdouble-conversion.a */ = {
1116+
isa = PBXReferenceProxy;
1117+
fileType = archive.ar;
1118+
path = "libdouble-conversion.a";
1119+
remoteRef = E766476420208BBA0037E950 /* PBXContainerItemProxy */;
1120+
sourceTree = BUILT_PRODUCTS_DIR;
1121+
};
1122+
E766476720208BBA0037E950 /* libprivatedata.a */ = {
1123+
isa = PBXReferenceProxy;
1124+
fileType = archive.ar;
1125+
path = libprivatedata.a;
1126+
remoteRef = E766476620208BBA0037E950 /* PBXContainerItemProxy */;
1127+
sourceTree = BUILT_PRODUCTS_DIR;
1128+
};
1129+
E766476920208BBA0037E950 /* libprivatedata-tvOS.a */ = {
1130+
isa = PBXReferenceProxy;
1131+
fileType = archive.ar;
1132+
path = "libprivatedata-tvOS.a";
1133+
remoteRef = E766476820208BBA0037E950 /* PBXContainerItemProxy */;
1134+
sourceTree = BUILT_PRODUCTS_DIR;
1135+
};
10451136
/* End PBXReferenceProxy section */
10461137

10471138
/* Begin PBXResourcesBuildPhase section */
@@ -1247,6 +1338,7 @@
12471338
CLANG_ENABLE_MODULES = YES;
12481339
CURRENT_PROJECT_VERSION = 1;
12491340
DEAD_CODE_STRIPPING = NO;
1341+
DEVELOPMENT_TEAM = 372ZUL2ZB7;
12501342
HEADER_SEARCH_PATHS = (
12511343
"$(inherited)",
12521344
"$(SRCROOT)/../node_modules/bugsnag-react-native/cocoa/**",
@@ -1259,6 +1351,7 @@
12591351
"-ObjC",
12601352
"-lc++",
12611353
);
1354+
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.reactnative.example;
12621355
PRODUCT_NAME = BugsnagReactNativeExample;
12631356
SWIFT_OBJC_BRIDGING_HEADER = "BugsnagReactNativeExample-Bridging-Header.h";
12641357
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -1274,6 +1367,7 @@
12741367
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
12751368
CLANG_ENABLE_MODULES = YES;
12761369
CURRENT_PROJECT_VERSION = 1;
1370+
DEVELOPMENT_TEAM = 372ZUL2ZB7;
12771371
HEADER_SEARCH_PATHS = (
12781372
"$(inherited)",
12791373
"$(SRCROOT)/../node_modules/bugsnag-react-native/cocoa/**",
@@ -1286,6 +1380,7 @@
12861380
"-ObjC",
12871381
"-lc++",
12881382
);
1383+
PRODUCT_BUNDLE_IDENTIFIER = com.bugsnag.reactnative.example;
12891384
PRODUCT_NAME = BugsnagReactNativeExample;
12901385
SWIFT_OBJC_BRIDGING_HEADER = "BugsnagReactNativeExample-Bridging-Header.h";
12911386
SWIFT_SWIFT3_OBJC_INFERENCE = On;

0 commit comments

Comments
 (0)