Skip to content

Commit 973d5fc

Browse files
Fix Sample app
1 parent a9cee98 commit 973d5fc

File tree

6 files changed

+45
-17
lines changed

6 files changed

+45
-17
lines changed

InstabugSample/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ android {
129129
}
130130

131131
dependencies {
132-
compile project(':react-native-dialogs')
133132
compile project(':instabug-reactnative')
133+
compile project(':react-native-dialogs')
134134
compile fileTree(dir: "libs", include: ["*.jar"])
135135
compile "com.android.support:appcompat-v7:23.0.1"
136136
compile "com.facebook.react:react-native:+" // From node_modules

InstabugSample/android/app/src/main/java/com/instabugsample/MainApplication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import android.util.Log;
55

66
import com.facebook.react.ReactApplication;
7-
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
87
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
8+
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
99
import com.facebook.react.ReactInstanceManager;
1010
import com.facebook.react.ReactNativeHost;
1111
import com.facebook.react.ReactPackage;
@@ -27,8 +27,8 @@ public boolean getUseDeveloperSupport() {
2727
protected List<ReactPackage> getPackages() {
2828
return Arrays.<ReactPackage>asList(
2929
new MainReactPackage(),
30-
new ReactNativeDialogsPackage(),
31-
new RNInstabugReactnativePackage("YOUR_ANDROID_APPLICATION_TOKEN",MainApplication.this)
30+
new RNInstabugReactnativePackage("YOUR_ANDROID_APPLICATION_TOKEN",MainApplication.this,"shake","#1D82DC"),
31+
new ReactNativeDialogsPackage()
3232
);
3333
}
3434
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rootProject.name = 'InstabugSample'
2-
include ':react-native-dialogs'
3-
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
42
include ':instabug-reactnative'
53
project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android')
4+
include ':react-native-dialogs'
5+
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
66

77
include ':app'

InstabugSample/index.android.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export default class InstabugSample extends Component {
2525

2626
constructor(props) {
2727
super(props);
28-
Instabug.startWithToken('0f0dc916bd9175e3b5d2fdf0cfa49a69',
29-
Instabug.invocationEvent.floatingButton);
30-
Instabug.setPreInvocationHandler(() => {
31-
Alert.alert("PreInvocationEvent", "Done :) ");
32-
});
28+
29+
Instabug.setColorTheme(Instabug.colorTheme.light);
30+
Instabug.setPrimaryColor(processColor('#aaff00'));
31+
Instabug.setEmailFieldRequired(false);
32+
3333
const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
3434
this.state = {
3535
dataSource: ds.cloneWithRows(this._genRows({})),

InstabugSample/ios/InstabugSample.xcodeproj/project.pbxproj

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
3737
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
3838
FB6237B8BC81FC0C990E8BE6 /* libPods-InstabugSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E9562565B465A2839B076D83 /* libPods-InstabugSample.a */; };
39-
DCC755EDCD9B460F84658AAD /* libRNInstabug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FED4204D49074081B94F4448 /* libRNInstabug.a */; };
39+
62F9158A7B074929B2D8A561 /* libRNInstabug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C533A1EEE6342FA8421CF36 /* libRNInstabug.a */; };
4040
/* End PBXBuildFile section */
4141

4242
/* Begin PBXContainerItemProxy section */
@@ -259,8 +259,8 @@
259259
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
260260
8601D784DB38337F6E545397 /* Pods-InstabugSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InstabugSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InstabugSample/Pods-InstabugSample.debug.xcconfig"; sourceTree = "<group>"; };
261261
E9562565B465A2839B076D83 /* libPods-InstabugSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InstabugSample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
262-
A0FE88E32F084FD8A95E38DF /* RNInstabug.xcodeproj */ = {isa = PBXFileReference; name = "RNInstabug.xcodeproj"; path = "../node_modules/instabug-reactnative/ios/RNInstabug.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
263-
FED4204D49074081B94F4448 /* libRNInstabug.a */ = {isa = PBXFileReference; name = "libRNInstabug.a"; path = "libRNInstabug.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
262+
1B17852ABF654B8D8B056F8E /* RNInstabug.xcodeproj */ = {isa = PBXFileReference; name = "RNInstabug.xcodeproj"; path = "../node_modules/instabug-reactnative/ios/RNInstabug.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
263+
6C533A1EEE6342FA8421CF36 /* libRNInstabug.a */ = {isa = PBXFileReference; name = "libRNInstabug.a"; path = "libRNInstabug.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
264264
/* End PBXFileReference section */
265265

266266
/* Begin PBXFrameworksBuildPhase section */
@@ -288,7 +288,7 @@
288288
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
289289
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
290290
FB6237B8BC81FC0C990E8BE6 /* libPods-InstabugSample.a in Frameworks */,
291-
DCC755EDCD9B460F84658AAD /* libRNInstabug.a in Frameworks */,
291+
62F9158A7B074929B2D8A561 /* libRNInstabug.a in Frameworks */,
292292
);
293293
runOnlyForDeploymentPostprocessing = 0;
294294
};
@@ -480,7 +480,7 @@
480480
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
481481
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
482482
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
483-
A0FE88E32F084FD8A95E38DF /* RNInstabug.xcodeproj */,
483+
1B17852ABF654B8D8B056F8E /* RNInstabug.xcodeproj */,
484484
);
485485
name = Libraries;
486486
sourceTree = "<group>";
@@ -1064,6 +1064,10 @@
10641064
);
10651065
PRODUCT_NAME = "$(TARGET_NAME)";
10661066
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugSample.app/InstabugSample";
1067+
HEADER_SEARCH_PATHS = (
1068+
"$(inherited)",
1069+
"$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug/**",
1070+
);
10671071
};
10681072
name = Debug;
10691073
};
@@ -1085,6 +1089,10 @@
10851089
);
10861090
PRODUCT_NAME = "$(TARGET_NAME)";
10871091
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InstabugSample.app/InstabugSample";
1092+
HEADER_SEARCH_PATHS = (
1093+
"$(inherited)",
1094+
"$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug/**",
1095+
);
10881096
};
10891097
name = Release;
10901098
};
@@ -1106,6 +1114,10 @@
11061114
);
11071115
PRODUCT_NAME = InstabugSample;
11081116
VERSIONING_SYSTEM = "apple-generic";
1117+
HEADER_SEARCH_PATHS = (
1118+
"$(inherited)",
1119+
"$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug/**",
1120+
);
11091121
};
11101122
name = Debug;
11111123
};
@@ -1126,6 +1138,10 @@
11261138
);
11271139
PRODUCT_NAME = InstabugSample;
11281140
VERSIONING_SYSTEM = "apple-generic";
1141+
HEADER_SEARCH_PATHS = (
1142+
"$(inherited)",
1143+
"$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug/**",
1144+
);
11291145
};
11301146
name = Release;
11311147
};
@@ -1156,6 +1172,10 @@
11561172
SDKROOT = appletvos;
11571173
TARGETED_DEVICE_FAMILY = 3;
11581174
TVOS_DEPLOYMENT_TARGET = 9.2;
1175+
HEADER_SEARCH_PATHS = (
1176+
"$(inherited)",
1177+
"$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug/**",
1178+
);
11591179
};
11601180
name = Debug;
11611181
};
@@ -1186,6 +1206,10 @@
11861206
SDKROOT = appletvos;
11871207
TARGETED_DEVICE_FAMILY = 3;
11881208
TVOS_DEPLOYMENT_TARGET = 9.2;
1209+
HEADER_SEARCH_PATHS = (
1210+
"$(inherited)",
1211+
"$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug/**",
1212+
);
11891213
};
11901214
name = Release;
11911215
};

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ public RNInstabugReactnativeModule(ReactApplicationContext reactContext, Applica
122122
super(reactContext);
123123
this.androidApplication = androidApplication;
124124
this.mInstabug = mInstabug;
125-
Instabug.invoke();
125+
try {
126+
Instabug.invoke();
127+
} catch (Exception e) {
128+
e.printStackTrace();
129+
}
126130
}
127131

128132
@Override

0 commit comments

Comments
 (0)