react-native-repro 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/android/src/main/java/io/repro/android/reactbridge/ReproReactBridgeModule.java +36 -0
  2. package/ios/RPRReproReactBridge.h +5 -0
  3. package/ios/RPRReproReactBridge.m +75 -0
  4. package/package.json +2 -2
  5. package/repro-version.json +3 -3
  6. package/sdk-android/io/repro/repro-android-sdk/6f405c6587220d5bebed9ae377d69cd272338679/repro-android-sdk-5.6.3.aar +0 -0
  7. package/sdk-android/io/repro/repro-android-sdk/6f405c6587220d5bebed9ae377d69cd272338679/repro-android-sdk-5.6.3.aar.md5 +1 -0
  8. package/sdk-android/io/repro/repro-android-sdk/6f405c6587220d5bebed9ae377d69cd272338679/repro-android-sdk-5.6.3.aar.sha1 +1 -0
  9. package/sdk-android/io/repro/repro-android-sdk/{5.6.0/repro-android-sdk-5.6.0.pom → 6f405c6587220d5bebed9ae377d69cd272338679/repro-android-sdk-5.6.3.pom} +1 -1
  10. package/sdk-android/io/repro/repro-android-sdk/6f405c6587220d5bebed9ae377d69cd272338679/repro-android-sdk-5.6.3.pom.md5 +1 -0
  11. package/sdk-android/io/repro/repro-android-sdk/6f405c6587220d5bebed9ae377d69cd272338679/repro-android-sdk-5.6.3.pom.sha1 +1 -0
  12. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml +3 -3
  13. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.md5 +1 -1
  14. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.sha1 +1 -1
  15. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Headers/RPRRemoteConfig.h +2 -2
  16. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Info.plist +0 -0
  17. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Repro +0 -0
  18. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/RPRRemoteConfig.h +2 -2
  19. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Info.plist +0 -0
  20. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Repro +0 -0
  21. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.aar +0 -0
  22. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.aar.md5 +0 -1
  23. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.aar.sha1 +0 -1
  24. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.pom.md5 +0 -1
  25. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.pom.sha1 +0 -1
@@ -14,7 +14,9 @@ import com.facebook.react.bridge.WritableArray;
14
14
  import com.facebook.react.bridge.WritableNativeArray;
15
15
  import com.facebook.react.bridge.ReadableArray;
16
16
  import com.facebook.react.bridge.Arguments;
17
+ import com.facebook.react.modules.systeminfo.ReactNativeVersion;
17
18
 
19
+ import java.lang.reflect.Method;
18
20
  import java.util.EnumSet;
19
21
  import java.util.HashMap;
20
22
  import java.util.Iterator;
@@ -57,9 +59,43 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
57
59
 
58
60
  private final ReactApplicationContext reactContext;
59
61
 
62
+ private static final String REPRO_REACT_NATIVE_BRIDGE_VERSION = "3.8.0";
63
+
60
64
  public ReproReactBridgeModule(ReactApplicationContext reactContext) {
61
65
  super(reactContext);
62
66
  this.reactContext = reactContext;
67
+ this.versionPassing();
68
+ }
69
+
70
+ private String getReactNativeVersion() {
71
+ try {
72
+ return String.format(Locale.US, "%d.%d.%d",
73
+ ReactNativeVersion.VERSION.get("major"),
74
+ ReactNativeVersion.VERSION.get("minor"),
75
+ ReactNativeVersion.VERSION.get("patch")
76
+ );
77
+ } catch (Throwable t) {
78
+ return null;
79
+ }
80
+ }
81
+
82
+ private void versionPassing() {
83
+ final Map<String, Object> platformValues = new HashMap<>();
84
+ platformValues.put("sub_sdk_platform", "react_native");
85
+ platformValues.put("sub_sdk_bridge_version", REPRO_REACT_NATIVE_BRIDGE_VERSION);
86
+
87
+ String rnVerString = getReactNativeVersion();
88
+ if (rnVerString != null) {
89
+ platformValues.put("sub_sdk_platform_version", rnVerString);
90
+ }
91
+
92
+ try {
93
+ Method method = Repro.class.getDeclaredMethod("_passRuntimeValues", Map.class);
94
+ method.setAccessible(true);
95
+ method.invoke(null, platformValues);
96
+ } catch (Throwable t) {
97
+ t.printStackTrace();
98
+ }
63
99
  }
64
100
 
65
101
  @Override
@@ -25,6 +25,11 @@
25
25
  #error "Can't find RCTBridgeModule.h anywhere."
26
26
  #endif
27
27
 
28
+
29
+ #define REPRO_REACT_NATIVE_BRIDGE_VERSION "3.8.0"
30
+
31
+
32
+
28
33
  @interface RPRRemoteConfigBridge: NSObject <RCTBridgeModule>
29
34
 
30
35
  @end
@@ -29,6 +29,31 @@
29
29
  #error "Can't find RCTConvert.h anywhere."
30
30
  #endif
31
31
 
32
+
33
+
34
+
35
+ // ReactNative Version >= 0.41
36
+ #if __has_include(<React/RCTVersion.h>)
37
+ #import <React/RCTVersion.h>
38
+
39
+ // ReactNative Version < 0.41
40
+ #elif __has_include("RCTVersion.h")
41
+ #import "RCTVersion.h"
42
+
43
+ // if ReactNative is a cocoapod and the project has swift enabled
44
+ #elif __has_include("React/RCTVersion.h")
45
+ #import "React/RCTVersion.h"
46
+
47
+ #else
48
+ #define RPR_CANT_DETERMINE_RN_VERSION 1
49
+ #endif
50
+
51
+
52
+
53
+
54
+
55
+
56
+
32
57
  static NSObject*
33
58
  safe_value(id value)
34
59
  {
@@ -186,8 +211,58 @@ RCT_EXPORT_METHOD(forceReset)
186
211
  @end
187
212
 
188
213
 
214
+
215
+
216
+ @interface Repro (NonPublicApi)
217
+ + (void)_passRuntimeValues:(nonnull NSDictionary<NSString *, NSString *> *)values;
218
+ @end
219
+
220
+
221
+
222
+
223
+ #ifndef RPR_CANT_DETERMINE_RN_VERSION
224
+ static NSString *get_react_native_version()
225
+ {
226
+ // see: https://github.com/facebook/react-native/commit/30469ed00170a74743d2ba5aadce61aae742715c#
227
+ #ifdef RCT_REACT_NATIVE_VERSION
228
+ NSDictionary *vermap = RCT_REACT_NATIVE_VERSION;
229
+ return [NSString stringWithFormat:@"%@.%@.%@",
230
+ vermap[@"major"],
231
+ vermap[@"minor"],
232
+ vermap[@"patch"]];
233
+
234
+ #else
235
+ NSDictionary *vermap = RCTGetReactNativeVersion();
236
+ return [NSString stringWithFormat:@"%@.%@.%@",
237
+ vermap[RCTVersionMajor],
238
+ vermap[RCTVersionMinor],
239
+ vermap[RCTVersionPatch]];
240
+
241
+ #endif
242
+ }
243
+ #endif
244
+
245
+
189
246
  @implementation RPRReproReactBridge
190
247
 
248
+ - (instancetype)init
249
+ {
250
+ self = [super init];
251
+
252
+ if ([Repro respondsToSelector:@selector(_passRuntimeValues:)]) {
253
+ [Repro _passRuntimeValues:@{
254
+ @"sub_sdk_platform": @"react_native",
255
+ #ifndef RPR_CANT_DETERMINE_RN_VERSION
256
+ @"sub_sdk_platform_version": get_react_native_version(),
257
+ #endif
258
+ @"sub_sdk_bridge_version": [NSString stringWithUTF8String:REPRO_REACT_NATIVE_BRIDGE_VERSION],
259
+ }];
260
+ }
261
+
262
+ return self;
263
+ }
264
+
265
+
191
266
  RCT_EXPORT_MODULE(Repro)
192
267
 
193
268
  - (NSDictionary *)constantsToExport
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-repro",
3
- "version": "3.7.0",
4
- "description": "Repro is a mobile analytics tool that lets you have much deeper understanding of mobile app users with play-by-play videos.",
3
+ "version": "3.8.0",
4
+ "description": "Repro is a mobile analytics tool that lets you have much deeper understanding of mobile app users.",
5
5
  "main": "index.js",
6
6
  "keywords": [
7
7
  "repro",
@@ -1,5 +1,5 @@
1
1
  {
2
- "ios-sdk": "5.8.0",
3
- "android-sdk": "5.6.0",
4
- "bridge": "3.7.0"
2
+ "ios-sdk": "5.8.3",
3
+ "android-sdk": "5.6.3",
4
+ "bridge": "3.8.0"
5
5
  }
@@ -4,6 +4,6 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>io.repro</groupId>
6
6
  <artifactId>repro-android-sdk</artifactId>
7
- <version>5.6.0</version>
7
+ <version>5.6.3</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -3,10 +3,10 @@
3
3
  <groupId>io.repro</groupId>
4
4
  <artifactId>repro-android-sdk</artifactId>
5
5
  <versioning>
6
- <release>5.6.0</release>
6
+ <release>5.6.3</release>
7
7
  <versions>
8
- <version>5.6.0</version>
8
+ <version>5.6.3</version>
9
9
  </versions>
10
- <lastUpdated>20211207144549</lastUpdated>
10
+ <lastUpdated>20220414164029</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -1 +1 @@
1
- 924daf8076ee56d2d816355b8cd95e8e
1
+ fe6f633c59c1db674bb5cb71b6612974
@@ -1 +1 @@
1
- 467c78928268a9e2770584753d8185648538be1d
1
+ 6ba3c4d64b8431c1c6702c5126880ac4c6575b55
@@ -98,11 +98,11 @@ NS_SWIFT_NAME(value(forKey:));
98
98
  /// Access to remote config values via subscript syntax.
99
99
  - (nonnull RPRRemoteConfigValue *)objectForKeyedSubscript:(nonnull NSString *)key;
100
100
 
101
- /// Return a dictonary with all key value pairs.
101
+ /// Return a dictionary with all key value pairs.
102
102
  - (nonnull NSDictionary<NSString *, RPRRemoteConfigValue *> *)allValues
103
103
  NS_SWIFT_NAME(allValues());
104
104
 
105
- /// Return a dictonary with all key value pairs for a given prefix. Pass `nil` or an empty string to get all values.
105
+ /// Return a dictionary with all key value pairs for a given prefix. Pass `nil` or an empty string to get all values.
106
106
  - (nonnull NSDictionary<NSString *, RPRRemoteConfigValue *> *)allValuesWithPrefix:(nullable NSString *)prefix
107
107
  NS_SWIFT_NAME(allValues(withPrefix:));
108
108
 
@@ -98,11 +98,11 @@ NS_SWIFT_NAME(value(forKey:));
98
98
  /// Access to remote config values via subscript syntax.
99
99
  - (nonnull RPRRemoteConfigValue *)objectForKeyedSubscript:(nonnull NSString *)key;
100
100
 
101
- /// Return a dictonary with all key value pairs.
101
+ /// Return a dictionary with all key value pairs.
102
102
  - (nonnull NSDictionary<NSString *, RPRRemoteConfigValue *> *)allValues
103
103
  NS_SWIFT_NAME(allValues());
104
104
 
105
- /// Return a dictonary with all key value pairs for a given prefix. Pass `nil` or an empty string to get all values.
105
+ /// Return a dictionary with all key value pairs for a given prefix. Pass `nil` or an empty string to get all values.
106
106
  - (nonnull NSDictionary<NSString *, RPRRemoteConfigValue *> *)allValuesWithPrefix:(nullable NSString *)prefix
107
107
  NS_SWIFT_NAME(allValues(withPrefix:));
108
108
 
@@ -1 +0,0 @@
1
- 95128ff0f21c7dce392fbe7376049930
@@ -1 +0,0 @@
1
- db014f9b390093608d5678da13c524b8f6f5ab7d
@@ -1 +0,0 @@
1
- 8887c317b5c45b11836fa33156a40986
@@ -1 +0,0 @@
1
- 6320bb92fa20c8a49d146decfdc83a49a0b00da3