Skip to content

Commit b68b8d4

Browse files
committed
Merged in release/15.1.0 (pull request #58)
Release/15.1.0
2 parents 7b6307f + 14041b2 commit b68b8d4

20 files changed

Lines changed: 767 additions & 592 deletions

File tree

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1-
# Shake for React Native
1+
# Shake React Native SDK
22

3-
[Shake](https://www.shakebugs.com) plugin for React Native.
3+
[![npm version](https://badge.fury.io/js/@shakebugs%2Freact-native-shake.svg)](https://badge.fury.io/js/@shakebugs%2Freact-native-shake)
4+
5+
React Native plugin for [bug reporting](https://www.shakebugs.com).
6+
7+
## Features
8+
9+
| Feature | Available |
10+
|:-----------------:|:-----------:|
11+
| Bug reporting ||
12+
| Crash reporting ||
13+
| Users ||
14+
15+
## Requirements
16+
17+
| Platform | Version |
18+
|:--------------:|:---------:|
19+
| React Native | 0.56 |
20+
| Android | 5.0 |
21+
| iOS | 12.0 |
422

523
## How to use
624

@@ -26,7 +44,7 @@ Install pods from the project root directory:
2644
cd ios && pod install && cd ..
2745
```
2846

29-
## Start Shake
47+
### Start Shake
3048
Call `Shake.start()` method in the *index.js* file.
3149

3250
```javascript title="index.js"
@@ -42,6 +60,6 @@ Shake.start('client-id', 'client-secret');
4260

4361
Replace `client-id` and `client-secret` with the actual values you have in [your workspace settings](https://app.shakebugs.com/settings/workspace#general).
4462

45-
## Documentation
63+
## Resources
4664

47-
Visit [documentation](https://www.shakebugs.com/docs) for more details.
65+
- [Official docs](https://www.shakebugs.com/docs/)

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ repositories {
7979
dependencies {
8080
//noinspection GradleDynamicVersion
8181
implementation 'com.facebook.react:react-native:+' // From node_modules
82-
api "$System.env.ANDROID_DEPENDENCY:15.0.+"
82+
api "$System.env.ANDROID_DEPENDENCY:15.1.+"
8383
}
8484

8585
def configureReactNativePom(def pom) {

android/src/main/java/com/shakebugs/react/ShakeModule.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import com.shakebugs.shake.ShakeInfo;
2626
import com.shakebugs.shake.ShakeReportConfiguration;
2727
import com.shakebugs.shake.ShakeScreen;
28-
import com.shakebugs.shake.internal.data.NetworkRequest;
29-
import com.shakebugs.shake.internal.data.NotificationEvent;
28+
import com.shakebugs.shake.internal.domain.models.NetworkRequest;
29+
import com.shakebugs.shake.internal.domain.models.NotificationEvent;
3030
import com.shakebugs.shake.privacy.NotificationEventEditor;
3131
import com.shakebugs.shake.privacy.NotificationEventsFilter;
3232
import com.shakebugs.shake.report.FeedbackType;
@@ -195,6 +195,25 @@ public void run() {
195195
});
196196
}
197197

198+
@ReactMethod
199+
public void getDefaultScreen(Promise promise) {
200+
ShakeScreen shakeScreen = Shake.getReportConfiguration().getDefaultScreen();
201+
String shakeScreenStr = shakeScreen.toString();
202+
203+
promise.resolve(shakeScreenStr);
204+
}
205+
206+
@ReactMethod
207+
public void setDefaultScreen(final ReadableMap shakeScreenMap) {
208+
runOnUiThread(new Runnable() {
209+
@Override
210+
public void run() {
211+
ShakeScreen shakeScreen = mapper.mapToShakeScreen(shakeScreenMap);
212+
Shake.getReportConfiguration().setDefaultScreen(shakeScreen);
213+
}
214+
});
215+
}
216+
198217
@ReactMethod
199218
public void isScreenshotIncluded(Promise promise) {
200219
promise.resolve(Shake.getReportConfiguration().isScreenshotIncluded());
@@ -355,6 +374,16 @@ public void run() {
355374
});
356375
}
357376

377+
@ReactMethod
378+
public void clearMetadata() {
379+
runOnUiThread(new Runnable() {
380+
@Override
381+
public void run() {
382+
Shake.clearMetadata();
383+
}
384+
});
385+
}
386+
358387
@ReactMethod
359388
public void setShakeReportData(final ReadableArray filesArray) {
360389
runOnUiThread(new Runnable() {

android/src/main/java/com/shakebugs/react/ShakeReflection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import com.shakebugs.react.utils.Logger;
66
import com.shakebugs.react.utils.Reflection;
77
import com.shakebugs.shake.ShakeInfo;
8-
import com.shakebugs.shake.internal.data.NetworkRequest;
9-
import com.shakebugs.shake.internal.data.NotificationEvent;
8+
import com.shakebugs.shake.internal.domain.models.NetworkRequest;
9+
import com.shakebugs.shake.internal.domain.models.NotificationEvent;
1010

1111
import java.lang.reflect.Method;
1212

android/src/main/java/com/shakebugs/react/utils/Emitter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.facebook.react.bridge.ReactContext;
44
import com.facebook.react.bridge.WritableMap;
55
import com.facebook.react.modules.core.DeviceEventManagerModule;
6-
import com.shakebugs.shake.internal.data.NotificationEvent;
6+
import com.shakebugs.shake.internal.domain.models.NotificationEvent;
77

88
public class Emitter {
99
private static final String EVENT_NOTIFICATION = "EventNotification";

android/src/main/java/com/shakebugs/react/utils/Mapper.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import com.shakebugs.shake.LogLevel;
1414
import com.shakebugs.shake.ShakeReportConfiguration;
1515
import com.shakebugs.shake.ShakeScreen;
16-
import com.shakebugs.shake.internal.data.NetworkRequest;
17-
import com.shakebugs.shake.internal.data.NotificationEvent;
16+
import com.shakebugs.shake.internal.domain.models.NetworkRequest;
17+
import com.shakebugs.shake.internal.domain.models.NotificationEvent;
1818
import com.shakebugs.shake.report.FeedbackType;
1919
import com.shakebugs.shake.report.ShakeFile;
2020

@@ -63,12 +63,14 @@ public ShakeReportConfiguration mapToConfiguration(ReadableMap configurationMap)
6363
boolean blackBoxData = configurationMap.getBoolean("blackBoxData");
6464
boolean activityHistoryData = configurationMap.getBoolean("activityHistoryData");
6565
boolean screenshot = configurationMap.getBoolean("screenshot");
66+
boolean video = configurationMap.getBoolean("video");
6667
boolean showReportSentMessage = configurationMap.getBoolean("showReportSentMessage");
6768

6869
ShakeReportConfiguration configuration = new ShakeReportConfiguration();
6970
configuration.blackBoxData = blackBoxData;
7071
configuration.activityHistoryData = activityHistoryData;
7172
configuration.screenshot = screenshot;
73+
configuration.video = video;
7274
configuration.showReportSentMessage = showReportSentMessage;
7375

7476
return configuration;
@@ -233,10 +235,13 @@ private Map<String, Object> toMap(ReadableMap readableMap) {
233235
map.put(key, readableMap.getString(key));
234236
break;
235237
case Map:
236-
map.put(key, toMap(readableMap.getMap(key)));
238+
ReadableMap m = readableMap.getMap(key);
239+
if (m != null) map.put(key, toMap(m));
240+
237241
break;
238242
case Array:
239-
map.put(key, toArray(readableMap.getArray(key)));
243+
ReadableArray a = readableMap.getArray(key);
244+
if (a != null) map.put(key, toArray(a));
240245
break;
241246
}
242247
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">Shake</string>
2+
<string name="app_name">Shake RN</string>
33
</resources>

example/ios/Podfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source 'https://github.com/CocoaPods/Specs.git'
44
require_relative '../node_modules/react-native/scripts/react_native_pods'
55
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
66

7-
platform :ios, '11.0'
7+
platform :ios, '12.0'
88

99
project 'example',
1010
'DevelopmentDebug' => :debug,
@@ -15,6 +15,7 @@ project 'example',
1515
'ProductionRelease' => :release
1616

1717
target 'example' do
18+
1819
pod 'RNFS', :path => '../node_modules/react-native-fs'
1920
pod 'RNCPushNotificationIOS', :path => '../node_modules/@react-native-community/push-notification-ios'
2021

@@ -39,8 +40,5 @@ target 'example' do
3940

4041
post_install do |installer|
4142
react_native_post_install(installer)
42-
installer.pods_project.build_configurations.each do |config|
43-
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
44-
end
4543
end
4644
end

example/ios/Podfile.lock

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ PODS:
277277
- React
278278
- react-native-shake (14.1.0):
279279
- React
280-
- Shake (~> 15.0.0)
280+
- Shake-Staging (~> 15.1.0-rc.1447)
281281
- react-native-slider (2.0.9):
282282
- React
283283
- react-native-webview (9.3.0):
@@ -362,7 +362,7 @@ PODS:
362362
- React
363363
- RNScreens (2.7.0):
364364
- React
365-
- Shake (15.0.0)
365+
- Shake-Staging (15.1.0-rc.1447)
366366
- Yoga (1.14.0)
367367
- YogaKit (1.18.1):
368368
- Yoga (~> 1.14)
@@ -435,6 +435,8 @@ DEPENDENCIES:
435435
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
436436

437437
SPEC REPOS:
438+
"git@github.com:shakebugs/Specs.git":
439+
- Shake-Staging
438440
https://github.com/CocoaPods/Specs.git:
439441
- boost-for-react-native
440442
- CocoaAsyncSocket
@@ -450,7 +452,6 @@ SPEC REPOS:
450452
- fmt
451453
- libevent
452454
- OpenSSL-Universal
453-
- Shake
454455
- YogaKit
455456

456457
EXTERNAL SOURCES:
@@ -572,7 +573,7 @@ SPEC CHECKSUMS:
572573
react-native-checkbox: 2d04aeb0c7e2c2cbd9a9a902ca6a5cf642688d09
573574
react-native-maps: f4b89da81626ad7f151a8bfcb79733295d31ce5c
574575
react-native-safe-area-context: 8260e5157617df4b72865f44006797f895b2ada7
575-
react-native-shake: 91238bed6328fc1bbdefa922c1605acce7a81313
576+
react-native-shake: 9b00818158045abdb40f16e8ce3c039e39c9f8b4
576577
react-native-slider: b34d943dc60deb96d952ba6b6b249aa8091e86da
577578
react-native-webview: bdde2a3c4cbdc0122bc2bfba13603db193f0cc5c
578579
React-perflogger: fd28ee1f2b5b150b00043f0301d96bd417fdc339
@@ -595,10 +596,10 @@ SPEC CHECKSUMS:
595596
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
596597
RNReanimated: 955cf4068714003d2f1a6e2bae3fb1118f359aff
597598
RNScreens: cf198f915f8a2bf163de94ca9f5bfc8d326c3706
598-
Shake: c5032f2a9dbfa2a8c33002609567f44a42176525
599+
Shake-Staging: 1e48bab5826b8192d7c0a3917f3e1e7d44d6b02e
599600
Yoga: aa0cb45287ebe1004c02a13f279c55a95f1572f4
600601
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
601602

602-
PODFILE CHECKSUM: f74bd3ae7cb43084c3aa4afe2dc911740679de66
603+
PODFILE CHECKSUM: 3d68bab78d41ff5c76df688461c486e9826619d6
603604

604605
COCOAPODS: 1.11.2

0 commit comments

Comments
 (0)