Skip to content

Commit eca8fbd

Browse files
committed
Merged in release/17.0.0 (pull request #87)
Release/17.0.0
2 parents 1078585 + 530e649 commit eca8fbd

File tree

14 files changed

+83
-76
lines changed

14 files changed

+83
-76
lines changed

README.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,18 @@ cd ios && pod install && cd ..
3939
Call `Shake.start()` method in the *index.js* file.
4040

4141
```javascript title="index.js"
42-
import {AppRegistry} from 'react-native';
42+
import {AppRegistry, Platform} from 'react-native';
4343
import App from './src/App';
4444
import {name as appName} from './app.json';
4545
import Shake from '@shakebugs/react-native-shake';
4646

4747
AppRegistry.registerComponent(appName, () => App);
4848

49-
Shake.start('client-id', 'client-secret');
49+
const apiKey = Platform.OS === 'ios' ? 'ios-app-api-key' : 'android-app-api-key';
50+
Shake.start(apiKey);
5051
```
5152

52-
Replace `client-id` and `client-secret` with the actual values you have in [your workspace settings](https://app.shakebugs.com/settings/workspace#general).
53-
54-
## Troubleshooting
55-
56-
If you get the following error during the build time:
57-
58-
```
59-
Execution failed for task ':app:mergeDexDebug'.
60-
```
61-
62-
You should set *multiDexEnabled* flag in app-level *build.gradle* like below:
63-
64-
```groovy title="app/build.gradle"
65-
defaultConfig {
66-
applicationId "com.shakebugs.react.example"
67-
minSdkVersion rootProject.ext.minSdkVersion
68-
targetSdkVersion rootProject.ext.targetSdkVersion
69-
versionCode 1
70-
versionName "1.0.0"
71-
multiDexEnabled true
72-
}
73-
```
53+
Replace `ios-app-api-key` and `android-app-api-key` with the actual values you have in your app settings.
7454

7555
## Resources
7656

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ repositories {
7676
dependencies {
7777
//noinspection GradleDynamicVersion
7878
implementation 'com.facebook.react:react-native:+' // From node_modules
79-
api "$System.env.ANDROID_DEPENDENCY:16.2.+"
79+
api "$System.env.ANDROID_DEPENDENCY:17.0.+"
8080
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,18 @@ private ShakeInfo buildShakePlatformInfo() {
8484
}
8585

8686
@ReactMethod
87-
public void start(final String clientId, final String clientSecret, final Promise promise) {
87+
public void start(final String apiKey, final Promise promise) {
8888
getReactApplicationContext().runOnUiQueueThread(new Runnable() {
8989
@Override
9090
public void run() {
9191
ShakeReflection.setShakeInfo(buildShakePlatformInfo());
9292

9393
Activity activity = getCurrentActivity();
9494
if (activity != null) {
95-
ShakeReflection.start(activity, clientId, clientSecret);
95+
ShakeReflection.start(activity, apiKey);
9696
} else {
9797
Application app = (Application) getReactApplicationContext().getApplicationContext();
98-
Shake.start(app, clientId, clientSecret);
98+
Shake.start(app, apiKey);
9999
}
100100

101101
startShakeCallbacksEmitter();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
public class ShakeReflection {
1414
private static final String CLASS_NAME = "com.shakebugs.shake.Shake";
1515

16-
public static void start(Activity activity, String clientId, String clientSecret) {
16+
public static void start(Activity activity, String apiKey) {
1717
try {
18-
Method method = Reflection.getMethod(Class.forName(CLASS_NAME), "startFromWrapper", Activity.class, String.class, String.class);
18+
Method method = Reflection.getMethod(Class.forName(CLASS_NAME), "startFromWrapper", Activity.class, String.class);
1919
//noinspection ConstantConditions
20-
method.invoke(null, activity, clientId, clientSecret);
20+
method.invoke(null, activity, apiKey);
2121
} catch (Exception e) {
2222
Logger.e("Failed to start Shake", e);
2323
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
public class Constants {
44
public static final String PLATFORM = "ReactNative";
55
public static final String VERSION_CODE = "1";
6-
public static final String VERSION_NAME = "16.2.0";
6+
public static final String VERSION_NAME = "17.0.0";
77
}

example/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import Shake from 'react-native-shake';
66
import messaging from '@react-native-firebase/messaging';
77

88
const startShake = async () => {
9-
const CLIENT_ID = 'HtTFUmUziF5Qjk1XLraAJXtVB1cL62yHWWqsDnrG';
10-
const CLIENT_SECRET =
11-
'IPRqEI2iSQhmUP6NGQcPNKCs7JQCJrpFUG0qDmLx4Yx2spd3caXnC3o';
12-
139
Shake.setInvokeShakeOnScreenshot(true);
1410
Shake.setInvokeShakeOnShakeDeviceEvent(true);
1511
Shake.setShowFloatingReportButton(true);
@@ -30,7 +26,12 @@ const startShake = async () => {
3026
console.log('Shake submitted!');
3127
});
3228

33-
await Shake.start(CLIENT_ID, CLIENT_SECRET);
29+
const apiKey =
30+
Platform.OS === 'ios'
31+
? 'Ny6x1eMCwSTNltepD8vLQ6iiYXqatEp2nWM7cFGM01opctfQfC802wf'
32+
: 'K9CeeyYp8aWIIWrKnT63c9StRXQa05pWzP1rYruYsIvmg1q0brwuvGM';
33+
await Shake.start(apiKey);
34+
3435
Shake.registerUser('test_user');
3536
};
3637

example/ios/Podfile.lock

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ PODS:
2121
- GoogleUtilities/Logger (~> 7.8)
2222
- FirebaseCoreExtension (10.12.0):
2323
- FirebaseCore (~> 10.0)
24-
- FirebaseCoreInternal (10.18.0):
24+
- FirebaseCoreInternal (10.25.0):
2525
- "GoogleUtilities/NSData+zlib (~> 7.8)"
26-
- FirebaseInstallations (10.18.0):
26+
- FirebaseInstallations (10.25.0):
2727
- FirebaseCore (~> 10.0)
2828
- GoogleUtilities/Environment (~> 7.8)
2929
- GoogleUtilities/UserDefaults (~> 7.8)
@@ -39,27 +39,35 @@ PODS:
3939
- nanopb (< 2.30910.0, >= 2.30908.0)
4040
- fmt (6.2.1)
4141
- glog (0.3.5)
42-
- GoogleDataTransport (9.2.5):
42+
- GoogleDataTransport (9.4.1):
4343
- GoogleUtilities/Environment (~> 7.7)
44-
- nanopb (< 2.30910.0, >= 2.30908.0)
44+
- nanopb (< 2.30911.0, >= 2.30908.0)
4545
- PromisesObjC (< 3.0, >= 1.2)
46-
- GoogleUtilities/AppDelegateSwizzler (7.12.0):
46+
- GoogleUtilities/AppDelegateSwizzler (7.13.3):
4747
- GoogleUtilities/Environment
4848
- GoogleUtilities/Logger
4949
- GoogleUtilities/Network
50-
- GoogleUtilities/Environment (7.12.0):
50+
- GoogleUtilities/Privacy
51+
- GoogleUtilities/Environment (7.13.3):
52+
- GoogleUtilities/Privacy
5153
- PromisesObjC (< 3.0, >= 1.2)
52-
- GoogleUtilities/Logger (7.12.0):
54+
- GoogleUtilities/Logger (7.13.3):
5355
- GoogleUtilities/Environment
54-
- GoogleUtilities/Network (7.12.0):
56+
- GoogleUtilities/Privacy
57+
- GoogleUtilities/Network (7.13.3):
5558
- GoogleUtilities/Logger
5659
- "GoogleUtilities/NSData+zlib"
60+
- GoogleUtilities/Privacy
5761
- GoogleUtilities/Reachability
58-
- "GoogleUtilities/NSData+zlib (7.12.0)"
59-
- GoogleUtilities/Reachability (7.12.0):
62+
- "GoogleUtilities/NSData+zlib (7.13.3)":
63+
- GoogleUtilities/Privacy
64+
- GoogleUtilities/Privacy (7.13.3)
65+
- GoogleUtilities/Reachability (7.13.3):
6066
- GoogleUtilities/Logger
61-
- GoogleUtilities/UserDefaults (7.12.0):
67+
- GoogleUtilities/Privacy
68+
- GoogleUtilities/UserDefaults (7.13.3):
6269
- GoogleUtilities/Logger
70+
- GoogleUtilities/Privacy
6371
- hermes-engine (0.71.14):
6472
- hermes-engine/Pre-built (= 0.71.14)
6573
- hermes-engine/Pre-built (0.71.14)
@@ -69,7 +77,7 @@ PODS:
6977
- nanopb/encode (= 2.30909.1)
7078
- nanopb/decode (2.30909.1)
7179
- nanopb/encode (2.30909.1)
72-
- PromisesObjC (2.3.1)
80+
- PromisesObjC (2.4.0)
7381
- RCT-Folly (2021.07.22.00):
7482
- boost
7583
- DoubleConversion
@@ -329,7 +337,7 @@ PODS:
329337
- ReactCommon/turbomodule/core
330338
- react-native-shake (16.2.0):
331339
- React
332-
- Shake-Staging (~> 16.2.0-rc)
340+
- Shake-Staging (~> 17.0.0-rc)
333341
- react-native-slider (4.4.2):
334342
- React-Core
335343
- React-perflogger (0.71.14)
@@ -469,7 +477,7 @@ PODS:
469477
- RNScreens (3.20.0):
470478
- React-Core
471479
- React-RCTImage
472-
- Shake-Staging (16.2.2-rc.1586)
480+
- Shake-Staging (17.0.0-rc.1603)
473481
- Yoga (1.14.0)
474482

475483
DEPENDENCIES:
@@ -649,17 +657,17 @@ SPEC CHECKSUMS:
649657
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0
650658
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed
651659
FirebaseCoreExtension: 0ce5ac36042001cfa233ce7bfa28e5c313cf80f4
652-
FirebaseCoreInternal: 8eb002e564b533bdcf1ba011f33f2b5c10e2ed4a
653-
FirebaseInstallations: e842042ec6ac1fd2e37d7706363ebe7f662afea4
660+
FirebaseCoreInternal: 910a81992c33715fec9263ca7381d59ab3a750b7
661+
FirebaseInstallations: 91950fe859846fff0fbd296180909dd273103b09
654662
FirebaseMessaging: bb2c4f6422a753038fe137d90ae7c1af57251316
655663
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
656664
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
657-
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
658-
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
665+
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
666+
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
659667
hermes-engine: d7cc127932c89c53374452d6f93473f1970d8e88
660668
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
661669
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
662-
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
670+
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
663671
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
664672
RCTRequired: e9df143e880d0e879e7a498dc06923d728809c79
665673
RCTTypeSafety: c2d89c8308829c12c038ec1f431191eaa0d8c15c
@@ -675,7 +683,7 @@ SPEC CHECKSUMS:
675683
React-jsinspector: 7bf923954b4e035f494b01ac16633963412660d7
676684
React-logger: 655ff5db8bd922acfbe76a4983ffab048916343e
677685
react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc
678-
react-native-shake: 11bfe589c915b008a4c39e85965de8b604604c20
686+
react-native-shake: 4a919b9b093747b790d35effd4f1b0d0d4958fa5
679687
react-native-slider: 33b8d190b59d4f67a541061bb91775d53d617d9d
680688
React-perflogger: 4987ad83731c23d11813c84263963b0d3028c966
681689
React-RCTActionSheet: 5ad952b2a9740d87a5bd77280c4bc23f6f89ea0c
@@ -701,9 +709,9 @@ SPEC CHECKSUMS:
701709
RNGestureHandler: 071d7a9ad81e8b83fe7663b303d132406a7d8f39
702710
RNReanimated: f0dd6b881808e635ef0673f89642937d6c141314
703711
RNScreens: 218801c16a2782546d30bd2026bb625c0302d70f
704-
Shake-Staging: fc62dde4ce849ae43ba6d932c42b75fe1be6c492
712+
Shake-Staging: 923b41d9c902e1f02e87acbe5f6899d905b76e60
705713
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9
706714

707715
PODFILE CHECKSUM: 851bc641080bb227691dcf7987476de3f8a70a9e
708716

709-
COCOAPODS: 1.12.1
717+
COCOAPODS: 1.14.3

example/ios/example.xcodeproj/project.pbxproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,20 @@
386386
);
387387
inputPaths = (
388388
"${PODS_ROOT}/Target Support Files/Pods-example-exampleTests/Pods-example-exampleTests-resources.sh",
389+
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal_Privacy.bundle",
390+
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations/FirebaseInstallations_Privacy.bundle",
391+
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport/GoogleDataTransport_Privacy.bundle",
392+
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities_Privacy.bundle",
393+
"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises_Privacy.bundle",
389394
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
390395
);
391396
name = "[CP] Copy Pods Resources";
392397
outputPaths = (
398+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreInternal_Privacy.bundle",
399+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseInstallations_Privacy.bundle",
400+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleDataTransport_Privacy.bundle",
401+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleUtilities_Privacy.bundle",
402+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBLPromises_Privacy.bundle",
393403
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
394404
);
395405
runOnlyForDeploymentPostprocessing = 0;
@@ -446,10 +456,20 @@
446456
);
447457
inputPaths = (
448458
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh",
459+
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal_Privacy.bundle",
460+
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations/FirebaseInstallations_Privacy.bundle",
461+
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport/GoogleDataTransport_Privacy.bundle",
462+
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities_Privacy.bundle",
463+
"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises_Privacy.bundle",
449464
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
450465
);
451466
name = "[CP] Copy Pods Resources";
452467
outputPaths = (
468+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreInternal_Privacy.bundle",
469+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseInstallations_Privacy.bundle",
470+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleDataTransport_Privacy.bundle",
471+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleUtilities_Privacy.bundle",
472+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBLPromises_Privacy.bundle",
453473
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
454474
);
455475
runOnlyForDeploymentPostprocessing = 0;

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "example",
3-
"version": "16.2.0",
3+
"version": "17.0.0",
44
"private": true,
55
"config": {
66
"android": {

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module "react-native-shake" {
2-
export function start(clientId: string, clientSecret: string): Promise<void>;
2+
export function start(apiKey: string): Promise<void>;
33

44
export function show(): void;
55

0 commit comments

Comments
 (0)