react-native-repro 3.9.0 → 3.10.1

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 (28) hide show
  1. package/android/src/main/java/io/repro/android/reactbridge/ReproEventEmitterOpenUrl.java +52 -0
  2. package/android/src/main/java/io/repro/android/reactbridge/ReproReactBridgeModule.java +1 -3
  3. package/android/src/main/java/io/repro/android/reactbridge/ReproReactBridgePackage.java +5 -1
  4. package/index.js +22 -1
  5. package/ios/RPRReproReactBridge.h +23 -2
  6. package/ios/RPRReproReactBridge.m +27 -4
  7. package/package.json +1 -1
  8. package/repro-version.json +3 -3
  9. package/sdk-android/io/repro/repro-android-sdk/5.7.1/repro-android-sdk-5.7.1.aar +0 -0
  10. package/sdk-android/io/repro/repro-android-sdk/5.7.1/repro-android-sdk-5.7.1.aar.md5 +1 -0
  11. package/sdk-android/io/repro/repro-android-sdk/5.7.1/repro-android-sdk-5.7.1.aar.sha1 +1 -0
  12. package/sdk-android/io/repro/repro-android-sdk/{5.6.3/repro-android-sdk-5.6.3.pom → 5.7.1/repro-android-sdk-5.7.1.pom} +1 -1
  13. package/sdk-android/io/repro/repro-android-sdk/5.7.1/repro-android-sdk-5.7.1.pom.md5 +1 -0
  14. package/sdk-android/io/repro/repro-android-sdk/5.7.1/repro-android-sdk-5.7.1.pom.sha1 +1 -0
  15. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml +3 -3
  16. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.md5 +1 -1
  17. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.sha1 +1 -1
  18. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Headers/Repro.h +13 -0
  19. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Info.plist +0 -0
  20. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Repro +0 -0
  21. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/Repro.h +13 -0
  22. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Info.plist +0 -0
  23. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Repro +0 -0
  24. package/sdk-android/io/repro/repro-android-sdk/5.6.3/repro-android-sdk-5.6.3.aar +0 -0
  25. package/sdk-android/io/repro/repro-android-sdk/5.6.3/repro-android-sdk-5.6.3.aar.md5 +0 -1
  26. package/sdk-android/io/repro/repro-android-sdk/5.6.3/repro-android-sdk-5.6.3.aar.sha1 +0 -1
  27. package/sdk-android/io/repro/repro-android-sdk/5.6.3/repro-android-sdk-5.6.3.pom.md5 +0 -1
  28. package/sdk-android/io/repro/repro-android-sdk/5.6.3/repro-android-sdk-5.6.3.pom.sha1 +0 -1
@@ -0,0 +1,52 @@
1
+
2
+ package io.repro.android.reactbridge;
3
+
4
+ import android.net.Uri;
5
+
6
+ import com.facebook.react.bridge.ReactApplicationContext;
7
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
8
+ import com.facebook.react.bridge.ReactMethod;
9
+ import com.facebook.react.modules.core.DeviceEventManagerModule;
10
+
11
+ import io.repro.android.Repro;
12
+
13
+
14
+ public class ReproEventEmitterOpenUrl extends ReactContextBaseJavaModule {
15
+
16
+ private final ReactApplicationContext reactContext;
17
+
18
+ public ReproEventEmitterOpenUrl(ReactApplicationContext reactContext) {
19
+ super(reactContext);
20
+ this.reactContext = reactContext;
21
+ }
22
+
23
+ // private void sendEvent(String eventName, @Nullable WritableMap params) {
24
+ private void sendEvent(String eventName, Object parameter) {
25
+ this.reactContext
26
+ .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
27
+ .emit(eventName, parameter);
28
+ }
29
+
30
+ @Override
31
+ public String getName() {
32
+ return "RPREventEmitterOpenUrl";
33
+ }
34
+
35
+ @ReactMethod
36
+ public void addListener(String eventName) {
37
+ Repro.setOpenUrlCallback(new Repro.OpenUrlCallback() {
38
+ @Override
39
+ public void onOpened(Uri uri) {
40
+ sendEvent("__RPR__openUrlCallback", uri.toString());
41
+ }
42
+ });
43
+ }
44
+
45
+ @ReactMethod
46
+ public void removeListeners(Integer count) {
47
+ Repro.setOpenUrlCallback(null);
48
+ }
49
+ }
50
+
51
+
52
+
@@ -17,9 +17,7 @@ import com.facebook.react.bridge.Arguments;
17
17
  import com.facebook.react.modules.systeminfo.ReactNativeVersion;
18
18
 
19
19
  import java.lang.reflect.Method;
20
- import java.util.EnumSet;
21
20
  import java.util.HashMap;
22
- import java.util.Iterator;
23
21
  import java.util.Map;
24
22
  import java.util.ArrayList;
25
23
  import java.util.List;
@@ -59,7 +57,7 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
59
57
 
60
58
  private final ReactApplicationContext reactContext;
61
59
 
62
- private static final String REPRO_REACT_NATIVE_BRIDGE_VERSION = "3.9.0";
60
+ private static final String REPRO_REACT_NATIVE_BRIDGE_VERSION = "3.10.1";
63
61
 
64
62
  public ReproReactBridgeModule(ReactApplicationContext reactContext) {
65
63
  super(reactContext);
@@ -16,7 +16,11 @@ public class ReproReactBridgePackage implements ReactPackage {
16
16
 
17
17
  @Override
18
18
  public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
19
- return Arrays.<NativeModule>asList(new ReproReactBridgeModule(reactContext), new ReproRemoteConfigBridge(reactContext));
19
+ return Arrays.<NativeModule>asList(
20
+ new ReproReactBridgeModule(reactContext),
21
+ new ReproEventEmitterOpenUrl(reactContext),
22
+ new ReproRemoteConfigBridge(reactContext)
23
+ );
20
24
  }
21
25
 
22
26
  // Deprecated from RN 0.47
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // import Repro from 'react-native-repro';
4
4
 
5
- import { NativeModules } from 'react-native';
5
+ import { NativeModules, NativeEventEmitter } from 'react-native';
6
6
 
7
7
  const safeString = (str) => {
8
8
  if (str && str === 'null') { return null };
@@ -210,11 +210,32 @@ class RemoteConfigModule {
210
210
  }
211
211
  }
212
212
 
213
+
214
+ class EventEmitterOpenUrl {
215
+ static setCallback(callback)
216
+ {
217
+ if (!this.emitter) {
218
+ this.emitter = new NativeEventEmitter(NativeModules.RPREventEmitterOpenUrl);
219
+ }
220
+
221
+ if (this.subscription) {
222
+ this.subscription.remove()
223
+ }
224
+
225
+ if (callback) {
226
+ this.subscription = this.emitter.addListener('__RPR__openUrlCallback', url => callback(url));
227
+ }
228
+ }
229
+ }
230
+
213
231
  const Repro = {
214
232
  ...NativeModules.Repro,
215
233
  ...NewsFeedModule,
216
234
  ...{ remoteConfig: RemoteConfigModule },
235
+
236
+ setOpenUrlCallback: EventEmitterOpenUrl.setCallback,
217
237
  }
218
238
 
239
+
219
240
  export default Repro;
220
241
 
@@ -26,7 +26,25 @@
26
26
  #endif
27
27
 
28
28
 
29
- #define REPRO_REACT_NATIVE_BRIDGE_VERSION "3.9.0"
29
+
30
+ // ReactNative Version >= 0.41
31
+ #if __has_include(<React/RCTEventEmitter.h>)
32
+ #import <React/RCTEventEmitter.h>
33
+
34
+ // ReactNative Version < 0.41
35
+ #elif __has_include("RCTEventEmitter.h")
36
+ #import "RCTEventEmitter.h"
37
+
38
+ // if ReactNative is a cocoapod and the project has swift enabled
39
+ #elif __has_include("React/RCTEventEmitter.h")
40
+ #import "React/RCTEventEmitter.h"
41
+
42
+ #else
43
+ #error "Can't find RCTEventEmitter.h anywhere."
44
+ #endif
45
+
46
+
47
+ #define REPRO_REACT_NATIVE_BRIDGE_VERSION "3.10.1"
30
48
 
31
49
 
32
50
 
@@ -34,7 +52,10 @@
34
52
 
35
53
  @end
36
54
 
37
-
38
55
  @interface RPRReproReactBridge : NSObject <RCTBridgeModule>
39
56
 
40
57
  @end
58
+
59
+ @interface RPREventEmitterOpenUrl : RCTEventEmitter <RCTBridgeModule>
60
+
61
+ @end
@@ -50,10 +50,6 @@
50
50
 
51
51
 
52
52
 
53
-
54
-
55
-
56
-
57
53
  static NSObject*
58
54
  safe_value(id value)
59
55
  {
@@ -698,3 +694,30 @@ RCT_EXPORT_METHOD(setSilverEggCookie:(NSString *)silverEggCookie)
698
694
 
699
695
  @end
700
696
 
697
+
698
+
699
+ @implementation RPREventEmitterOpenUrl
700
+
701
+ RCT_EXPORT_MODULE()
702
+
703
+ - (NSArray<NSString*> *)supportedEvents
704
+ {
705
+ return @[@"__RPR__openUrlCallback"];
706
+ }
707
+
708
+ - (void)startObserving
709
+ {
710
+ [Repro setOpenUrlCallback:^(NSURL * _Nonnull url) {
711
+ [self sendEventWithName:@"__RPR__openUrlCallback" body:url.absoluteString];
712
+ }];
713
+ }
714
+
715
+ - (void)stopObserving
716
+ {
717
+ [Repro setOpenUrlCallback:nil];
718
+ }
719
+
720
+ @end
721
+
722
+
723
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-repro",
3
- "version": "3.9.0",
3
+ "version": "3.10.1",
4
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": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "ios-sdk": "5.8.3",
3
- "android-sdk": "5.6.3",
4
- "bridge": "3.9.0"
2
+ "ios-sdk": "5.9.1",
3
+ "android-sdk": "5.7.1",
4
+ "bridge": "3.10.1"
5
5
  }
@@ -0,0 +1 @@
1
+ ead4460ac678209f58cecedfb58092a8
@@ -0,0 +1 @@
1
+ 75e267a7f55031dbb0e5e7eadbf328d8056e42be
@@ -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.3</version>
7
+ <version>5.7.1</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ cf31f7a9efcdf2af2f482e17395af766
@@ -0,0 +1 @@
1
+ d851e84ae7655e2be2263e2c8904cd7ca8894475
@@ -3,10 +3,10 @@
3
3
  <groupId>io.repro</groupId>
4
4
  <artifactId>repro-android-sdk</artifactId>
5
5
  <versioning>
6
- <release>5.6.3</release>
6
+ <release>5.7.1</release>
7
7
  <versions>
8
- <version>5.6.3</version>
8
+ <version>5.7.1</version>
9
9
  </versions>
10
- <lastUpdated>20220608194718</lastUpdated>
10
+ <lastUpdated>20221005180530</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -1 +1 @@
1
- f0a2977b387f3e030fbee96cff0aa308
1
+ 668411a75fe0b18459e91f403d842652
@@ -1 +1 @@
1
- 120afe267300aef6c8165b57c63143579ae431c0
1
+ a507e3e7c450b4ac469d665538a1af14c124100f
@@ -69,6 +69,9 @@ NS_SWIFT_NAME(setUserProfile(emailAddress:));
69
69
 
70
70
 
71
71
  // Event tracking
72
+ + (void)track:(nonnull NSString *)name
73
+ NS_SWIFT_NAME(track(event:));
74
+
72
75
  + (void)track:(nonnull NSString *)name properties:(nullable NSDictionary *)properties
73
76
  NS_SWIFT_NAME(track(event:properties:));
74
77
 
@@ -136,6 +139,16 @@ NS_SWIFT_NAME(set(silverEggCookie:));
136
139
  + (void)setSilverEggProdKey:(nonnull NSString *)silverEggProdKey
137
140
  NS_SWIFT_NAME(set(silverEggProdKey:));
138
141
 
142
+
143
+ // Event Callbacks
144
+
145
+ + (void)addOpenUrlFilterRegEx:(nonnull NSString *)filterRegEx
146
+ NS_SWIFT_NAME(add(openUrlFilterRegEx:));
147
+
148
+ + (void)setOpenUrlCallback:(void(^ _Nullable)(NSURL * _Nonnull url))callback
149
+ NS_SWIFT_NAME(setOpenUrlCallback(_:));
150
+
151
+
139
152
  // Remote Configuration
140
153
  @property (class, nonatomic, readonly, nonnull) RPRRemoteConfig *remoteConfig;
141
154
 
@@ -69,6 +69,9 @@ NS_SWIFT_NAME(setUserProfile(emailAddress:));
69
69
 
70
70
 
71
71
  // Event tracking
72
+ + (void)track:(nonnull NSString *)name
73
+ NS_SWIFT_NAME(track(event:));
74
+
72
75
  + (void)track:(nonnull NSString *)name properties:(nullable NSDictionary *)properties
73
76
  NS_SWIFT_NAME(track(event:properties:));
74
77
 
@@ -136,6 +139,16 @@ NS_SWIFT_NAME(set(silverEggCookie:));
136
139
  + (void)setSilverEggProdKey:(nonnull NSString *)silverEggProdKey
137
140
  NS_SWIFT_NAME(set(silverEggProdKey:));
138
141
 
142
+
143
+ // Event Callbacks
144
+
145
+ + (void)addOpenUrlFilterRegEx:(nonnull NSString *)filterRegEx
146
+ NS_SWIFT_NAME(add(openUrlFilterRegEx:));
147
+
148
+ + (void)setOpenUrlCallback:(void(^ _Nullable)(NSURL * _Nonnull url))callback
149
+ NS_SWIFT_NAME(setOpenUrlCallback(_:));
150
+
151
+
139
152
  // Remote Configuration
140
153
  @property (class, nonatomic, readonly, nonnull) RPRRemoteConfig *remoteConfig;
141
154
 
@@ -1 +0,0 @@
1
- 83b1e3e6478196a9b5de07ed402461c4
@@ -1 +0,0 @@
1
- 8c84ee19f1ceba57f18016b716b9b1e5163d9697
@@ -1 +0,0 @@
1
- ebbd73d813575a6838a15e006ccf7553
@@ -1 +0,0 @@
1
- 1c5eb358e76899c315a6b750d4bc86f3cd5a874e