@yeomessagingcom/react-native-yeofr 0.1.3 → 0.1.4

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.
package/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { NativeModules } from 'react-native';
2
2
  const { YEOFRModule } = NativeModules as any;
3
3
 
4
+ export const getVersion = (): Promise<string> => YEOFRModule.getVersion();
4
5
  export const createTracker = (): Promise<number> => YEOFRModule.createTracker();
5
6
  export const freeTracker = (): Promise<number> => YEOFRModule.freeTracker();
6
7
  export const getTrackerData = (): Promise<string> => YEOFRModule.getTrackerData();
@@ -6,6 +6,10 @@ class YEOFRModule: NSObject {
6
6
  private let sdk = YEOFRSDK.shared
7
7
  @objc static func requiresMainQueueSetup() -> Bool { false }
8
8
 
9
+ @objc
10
+ func getVersion(_ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
11
+ resolve(sdk.version)
12
+ }
9
13
  @objc func createTracker(_ resolve: RCTPromiseResolveBlock, rejecter reject: RCTPromiseRejectBlock) {
10
14
  let rc = sdk.createTracker()
11
15
  rc == .OK ? resolve(rc.rawValue) : reject("rc", "createTracker failed: \(rc.rawValue)", nil)
@@ -1,33 +1,35 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = "react-native-yeofr"
3
- s.version = "0.1.3" # keep in lockstep with npm + SPM release tag
3
+ s.version = "0.1.4" # <-- npm package version
4
4
  s.summary = "React Native iOS integration for YEO Face Recognition (device-only)."
5
5
  s.homepage = "https://github.com/yeomessaging/react-native-yeofr"
6
6
  s.license = { :type => "Commercial", :file => "../LICENSE" }
7
7
  s.author = { "YEO Messaging" => "luca@yeomessaging.com" }
8
- s.platform = :ios, "15.0"
8
+ s.platform = :ios, "15.1"
9
9
  s.swift_version = "5.9"
10
10
 
11
11
  # Only the RN shim files (bridges are inside your xcframework)
12
12
  s.source_files = "YEOFRModule.m", "YEOFRModule.swift"
13
13
 
14
- # Download the binary zip from your SPM repo release assets
15
- repo = "https://github.com/YEOMessaging/YEOFR-SPM"
16
- zip = "YEOFR.xcframework.zip"
17
- url = ENV['YEOFR_XCFRAMEWORK_URL'] || "#{repo}/releases/download/#{s.version}/#{zip}"
14
+ # --- Decouple binary version from npm version ---
15
+ # Default the binary version to 0.1.3 (your SPM release),
16
+ # but allow override via env var YEOFR_BINARY_VERSION.
17
+ bin_ver = ENV['YEOFR_BINARY_VERSION'] || "0.1.3"
18
+ repo = "https://github.com/YEOMessaging/YEOFR-SPM"
19
+ zip = "YEOFR.xcframework.zip"
20
+ url = ENV['YEOFR_XCFRAMEWORK_URL'] || "#{repo}/releases/download/#{bin_ver}/#{zip}"
21
+
22
+ # Public download path (CocoaPods will auto-unzip)
18
23
  s.source = { :http => url }
19
- # Optionally verify integrity:
20
- # s.source = { :http => url, :sha256 => "PUT_SHA256_HERE" }
24
+ # Optionally pin integrity:
25
+ # s.source = { :http => url, :sha256 => "PUT_SHA256_OF_ZIP_HERE" }
21
26
 
22
- s.prepare_command = <<-CMD
23
- rm -rf Vendor && mkdir -p Vendor
24
- unzip -o #{zip} -d Vendor >/dev/null
25
- CMD
27
+ # After unzip, the framework sits at the pod checkout root
28
+ s.vendored_frameworks = "YEOFR.xcframework"
26
29
 
27
- s.vendored_frameworks = "Vendor/YEOFR.xcframework"
28
30
  s.dependency "React-Core"
29
31
 
30
- # Device-only: exclude simulator archs
32
+ # Device-only
31
33
  s.pod_target_xcconfig = {
32
34
  'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 x86_64 arm64',
33
35
  'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeomessagingcom/react-native-yeofr",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "React Native iOS integration for YEO Face Recognition (device-only).",
5
5
  "main": "index.ts",
6
6
  "react-native": "index.ts",
@@ -8,10 +8,13 @@
8
8
  "author": "YEO Messaging",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/yeomessaging/react-native-yeofr.git"
11
+ "url": "git+https://github.com/yeomessaging/react-native-yeofr.git"
12
12
  },
13
13
  "homepage": "https://github.com/YEOMessaging/react-native-yeofr#readme",
14
- "bugs": { "email": "luca@yeomessaging.com", "url": "https://github.com/YEOMessaging/react-native-yeofr/issues" },
14
+ "bugs": {
15
+ "email": "luca@yeomessaging.com",
16
+ "url": "https://github.com/YEOMessaging/react-native-yeofr/issues"
17
+ },
15
18
  "files": [
16
19
  "index.ts",
17
20
  "ios",
@@ -19,11 +22,16 @@
19
22
  "README.md",
20
23
  "LICENSE"
21
24
  ],
22
- "keywords": ["react-native", "ios", "face-recognition", "yeofr"],
25
+ "keywords": [
26
+ "react-native",
27
+ "ios",
28
+ "face-recognition",
29
+ "yeofr"
30
+ ],
23
31
  "peerDependencies": {
24
- "react-native": ">=0.72.0"
25
- },
26
- "devDependencies": {
32
+ "react-native": ">=0.72.0"
33
+ },
34
+ "devDependencies": {
27
35
  "@types/react-native": "^0.72.0"
28
36
  }
29
- }
37
+ }