omnipay-reactnative-sdk 1.2.3-beta.6 → 1.2.3-beta.7
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.
|
@@ -20,6 +20,7 @@ import com.facebook.react.bridge.ReadableArray;
|
|
|
20
20
|
import com.facebook.react.bridge.ReadableMap;
|
|
21
21
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
22
22
|
import com.facebook.react.bridge.WritableMap;
|
|
23
|
+
import com.mrousavy.camera.frameprocessor.FrameProcessorPluginRegistry;
|
|
23
24
|
|
|
24
25
|
public class OmnipayActivityModule extends ReactContextBaseJavaModule {
|
|
25
26
|
private static final String ERROR = "ERROR";
|
|
@@ -38,6 +39,13 @@ public class OmnipayActivityModule extends ReactContextBaseJavaModule {
|
|
|
38
39
|
super(reactContext);
|
|
39
40
|
this.reactContext = reactContext;
|
|
40
41
|
this.reactContext.addActivityEventListener(mActivityEventListener);
|
|
42
|
+
|
|
43
|
+
// Ensure frame processor plugin is registered
|
|
44
|
+
try {
|
|
45
|
+
FrameProcessorPluginRegistry.addFrameProcessorPlugin("detectFaces", FaceVerificationFrameProcessor::new);
|
|
46
|
+
} catch (Exception e) {
|
|
47
|
+
e.printStackTrace();
|
|
48
|
+
}
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
@Override
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
#import "omnipay_reactnative_sdk-Swift.h"
|
|
5
|
-
|
|
6
|
-
VISION_EXPORT_SWIFT_FRAME_PROCESSOR(FaceVerificationFrameProcessor, detectFaces)
|
|
1
|
+
// Frame processor registration is now handled in OmnipayReactnativeSdk.m
|
|
2
|
+
// This file is kept for potential future use
|
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
#import <React/RCTBridgeModule.h>
|
|
2
2
|
|
|
3
|
+
// Import the frame processor plugin registration
|
|
4
|
+
#if __has_include("VisionCamera/FrameProcessorPlugin.h")
|
|
5
|
+
#import <VisionCamera/FrameProcessorPlugin.h>
|
|
6
|
+
#import <VisionCamera/FrameProcessorPluginRegistry.h>
|
|
7
|
+
|
|
8
|
+
#if __has_include("omnipay_reactnative_sdk/omnipay_reactnative_sdk-Swift.h")
|
|
9
|
+
#import "omnipay_reactnative_sdk/omnipay_reactnative_sdk-Swift.h"
|
|
10
|
+
#else
|
|
11
|
+
#import "omnipay_reactnative_sdk-Swift.h"
|
|
12
|
+
#endif
|
|
13
|
+
#endif
|
|
14
|
+
|
|
3
15
|
@interface RCT_EXTERN_MODULE(OmnipayReactnativeSdk, NSObject)
|
|
4
16
|
|
|
5
|
-
@end
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
// Ensure frame processor is registered when module loads
|
|
20
|
+
#if __has_include("VisionCamera/FrameProcessorPlugin.h")
|
|
21
|
+
@implementation OmnipayReactnativeSdk
|
|
22
|
+
|
|
23
|
+
+ (void)load {
|
|
24
|
+
[FrameProcessorPluginRegistry addFrameProcessorPlugin:@"detectFaces"
|
|
25
|
+
withInitializer:^FrameProcessorPlugin*(VisionCameraProxyHolder* proxy, NSDictionary* options) {
|
|
26
|
+
return [[FaceVerificationFrameProcessor alloc] initWithProxy:proxy options:options];
|
|
27
|
+
}];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@end
|
|
31
|
+
#endif
|