@veryai/react-native-sdk 1.0.53 → 1.0.54

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/README.md CHANGED
@@ -248,3 +248,20 @@ The full list lives in the [top-level README](../README.md#error-codes). One sli
248
248
  | 6106 | `NATIVE_LIB_DOWNLOAD_FAILED` | Slim-mode partner: the SDK couldn't fetch the palm asset from CDN. Check internet, CDN allowlist, or revert to bundled mode. |
249
249
 
250
250
  Use `VerySDK.isSupported()` to check device compatibility at runtime before showing the verification UI.
251
+
252
+ ### Prefetching the palm asset (slim mode)
253
+
254
+ In slim mode the palm asset is downloaded from CDN on the first scan, which can
255
+ add a 5–15s wait. Call `VerySDK.prefetch()` early — e.g. at app launch — to warm
256
+ that download in the background so the first scan is instant. It's
257
+ fire-and-forget, safe to call repeatedly, and a no-op in bundled mode or once the
258
+ asset is cached. (`isSupported()` already triggers the same warm-up as a side
259
+ effect, so an explicit `prefetch()` is only needed when you want to start the
260
+ download without the support check.)
261
+
262
+ ```typescript
263
+ import { VerySDK } from "@veryai/react-native-sdk";
264
+
265
+ // e.g. in your app's startup
266
+ VerySDK.prefetch();
267
+ ```
@@ -74,16 +74,32 @@ repositories {
74
74
  mavenCentral()
75
75
  }
76
76
 
77
+ // SDK dependency version — never hardcoded, so it can't drift behind the SDK
78
+ // source. Resolution order:
79
+ // 1. -PverySDKVersion=… (CI override against a locally-published build)
80
+ // 2. the repo-root VERSION file (single source of truth when building from
81
+ // source in this repo — same value CI publishes for iOS/Android)
82
+ // 3. this wrapper's own package.json version (when consumed from npm, where
83
+ // CI has set it equal to the released SDK version)
84
+ def resolveVerySDKVersion = {
85
+ def explicit = project.findProperty('verySDKVersion')
86
+ if (explicit) return explicit
87
+ def versionFile = file("$projectDir/../../VERSION")
88
+ if (versionFile.exists()) return versionFile.text.trim()
89
+ return new groovy.json.JsonSlurper().parseText(file("$projectDir/../package.json").text).version
90
+ }
91
+
77
92
  dependencies {
78
93
  implementation "com.facebook.react:react-native:+"
79
94
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
80
95
 
81
- // Very SDK - use published Maven artifact in production,
82
- // or local project dependency during development
96
+ // Very SDK - local project dependency during development (if the host
97
+ // build includes :very-sdk), else the published Maven artifact at the
98
+ // version resolved above.
83
99
  if (findProject(':very-sdk') != null) {
84
100
  implementation project(':very-sdk')
85
101
  } else {
86
- implementation "org.very:sdk:${project.findProperty('verySDKVersion') ?: '1.0.53'}"
102
+ implementation "org.very:sdk:${resolveVerySDKVersion()}"
87
103
  }
88
104
  }
89
105
 
@@ -58,6 +58,13 @@ class VerySDKModuleImpl(private val reactContext: ReactApplicationContext) {
58
58
  promise.resolve(VerySDK.isSupported(context))
59
59
  }
60
60
 
61
+ fun prefetch(promise: Promise) {
62
+ // Fire-and-forget; resolves immediately. Uses the application-scoped
63
+ // ReactContext so the warm-up isn't tied to an Activity lifecycle.
64
+ VerySDK.prefetch(reactContext)
65
+ promise.resolve(null)
66
+ }
67
+
61
68
  companion object {
62
69
  const val NAME = "VerySDKRN"
63
70
  }
@@ -18,4 +18,8 @@ class VerySDKModule(reactContext: ReactApplicationContext) :
18
18
  override fun isSupported(promise: Promise) {
19
19
  impl.isSupported(promise)
20
20
  }
21
+
22
+ override fun prefetch(promise: Promise) {
23
+ impl.prefetch(promise)
24
+ }
21
25
  }
@@ -22,4 +22,9 @@ class VerySDKModule(reactContext: ReactApplicationContext) :
22
22
  fun isSupported(promise: Promise) {
23
23
  impl.isSupported(promise)
24
24
  }
25
+
26
+ @ReactMethod
27
+ fun prefetch(promise: Promise) {
28
+ impl.prefetch(promise)
29
+ }
25
30
  }
package/ios/VerySDKRN.mm CHANGED
@@ -13,6 +13,9 @@ RCT_EXTERN_METHOD(authenticate:(NSDictionary *)config
13
13
  RCT_EXTERN_METHOD(isSupported:(RCTPromiseResolveBlock)resolve
14
14
  reject:(RCTPromiseRejectBlock)reject)
15
15
 
16
+ RCT_EXTERN_METHOD(prefetch:(RCTPromiseResolveBlock)resolve
17
+ reject:(RCTPromiseRejectBlock)reject)
18
+
16
19
  @end
17
20
 
18
21
  #ifdef RCT_NEW_ARCH_ENABLED
@@ -68,6 +68,13 @@ class VerySDKRN: NSObject {
68
68
  resolve(VerySDK.isSupported())
69
69
  }
70
70
 
71
+ @objc(prefetch:reject:)
72
+ func prefetch(_ resolve: RCTPromiseResolveBlock,
73
+ reject: RCTPromiseRejectBlock) {
74
+ VerySDK.prefetch()
75
+ resolve(nil)
76
+ }
77
+
71
78
  // MARK: - Helper
72
79
 
73
80
  private static func topViewController() -> UIViewController? {
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVerySDK.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAOpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVerySDK.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAQpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
@@ -28,6 +28,16 @@ const VerySDK = exports.VerySDK = {
28
28
  },
29
29
  async isSupported() {
30
30
  return _NativeVerySDK.default.isSupported();
31
+ },
32
+ /**
33
+ * Warm up the palm-scan model/native-lib download ahead of
34
+ * {@link authenticate}. Fire-and-forget and safe to call repeatedly; a
35
+ * no-op once the asset is bundled or cached. Call it early (e.g. on app
36
+ * launch) so the download runs while the user is elsewhere instead of
37
+ * blocking the first scan.
38
+ */
39
+ async prefetch() {
40
+ return _NativeVerySDK.default.prefetch();
31
41
  }
32
42
  };
33
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_NativeVerySDK","_interopRequireDefault","require","e","__esModule","default","VerySDK","exports","authenticate","config","raw","NativeModule","sdkKey","userId","language","themeMode","presentationStyle","livenessMode","debugLogging","code","signedToken","undefined","error","errorMessage","isSuccess","isSupported"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKpC,MAAMG,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACrB,MAAME,YAAYA,CAACC,MAAkB,EAAuB;IAC1D,MAAMC,GAAG,GAAI,MAAMC,sBAAY,CAACH,YAAY,CAAC;MAC3CI,MAAM,EAAEH,MAAM,CAACG,MAAM;MACrBC,MAAM,EAAEJ,MAAM,CAACI,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAEL,MAAM,CAACK,QAAQ,IAAI,IAAI;MACjCC,SAAS,EAAEN,MAAM,CAACM,SAAS,IAAI,MAAM;MACrCC,iBAAiB,EAAEP,MAAM,CAACO,iBAAiB,IAAI,YAAY;MAC3DC,YAAY,EAAER,MAAM,CAACQ,YAAY,IAAI,IAAI;MACzCC,YAAY,EAAET,MAAM,CAACS,YAAY,IAAI;IACvC,CAAC,CAA6B;IAC9B,OAAO;MACLC,IAAI,EAAET,GAAG,CAACS,IAAc;MACxBN,MAAM,EAAEH,GAAG,CAACG,MAAgB;MAC5BO,WAAW,EAAGV,GAAG,CAACU,WAAW,IAAeC,SAAS;MACrDC,KAAK,EAAGZ,GAAG,CAACY,KAAK,IAAeD,SAAS;MACzCE,YAAY,EAAGb,GAAG,CAACa,YAAY,IAAeF,SAAS;MACvDG,SAAS,EAAEd,GAAG,CAACc;IACjB,CAAC;EACH,CAAC;EAED,MAAMC,WAAWA,CAAA,EAAqB;IACpC,OAAOd,sBAAY,CAACc,WAAW,CAAC,CAAC;EACnC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_NativeVerySDK","_interopRequireDefault","require","e","__esModule","default","VerySDK","exports","authenticate","config","raw","NativeModule","sdkKey","userId","language","themeMode","presentationStyle","livenessMode","debugLogging","code","signedToken","undefined","error","errorMessage","isSuccess","isSupported","prefetch"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAKpC,MAAMG,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACrB,MAAME,YAAYA,CAACC,MAAkB,EAAuB;IAC1D,MAAMC,GAAG,GAAI,MAAMC,sBAAY,CAACH,YAAY,CAAC;MAC3CI,MAAM,EAAEH,MAAM,CAACG,MAAM;MACrBC,MAAM,EAAEJ,MAAM,CAACI,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAEL,MAAM,CAACK,QAAQ,IAAI,IAAI;MACjCC,SAAS,EAAEN,MAAM,CAACM,SAAS,IAAI,MAAM;MACrCC,iBAAiB,EAAEP,MAAM,CAACO,iBAAiB,IAAI,YAAY;MAC3DC,YAAY,EAAER,MAAM,CAACQ,YAAY,IAAI,IAAI;MACzCC,YAAY,EAAET,MAAM,CAACS,YAAY,IAAI;IACvC,CAAC,CAA6B;IAC9B,OAAO;MACLC,IAAI,EAAET,GAAG,CAACS,IAAc;MACxBN,MAAM,EAAEH,GAAG,CAACG,MAAgB;MAC5BO,WAAW,EAAGV,GAAG,CAACU,WAAW,IAAeC,SAAS;MACrDC,KAAK,EAAGZ,GAAG,CAACY,KAAK,IAAeD,SAAS;MACzCE,YAAY,EAAGb,GAAG,CAACa,YAAY,IAAeF,SAAS;MACvDG,SAAS,EAAEd,GAAG,CAACc;IACjB,CAAC;EACH,CAAC;EAED,MAAMC,WAAWA,CAAA,EAAqB;IACpC,OAAOd,sBAAY,CAACc,WAAW,CAAC,CAAC;EACnC,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,QAAQA,CAAA,EAAkB;IAC9B,OAAOf,sBAAY,CAACe,QAAQ,CAAC,CAAC;EAChC;AACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVerySDK.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAOlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeVerySDK.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAQlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
@@ -23,6 +23,16 @@ export const VerySDK = {
23
23
  },
24
24
  async isSupported() {
25
25
  return NativeModule.isSupported();
26
+ },
27
+ /**
28
+ * Warm up the palm-scan model/native-lib download ahead of
29
+ * {@link authenticate}. Fire-and-forget and safe to call repeatedly; a
30
+ * no-op once the asset is bundled or cached. Call it early (e.g. on app
31
+ * launch) so the download runs while the user is elsewhere instead of
32
+ * blocking the first scan.
33
+ */
34
+ async prefetch() {
35
+ return NativeModule.prefetch();
26
36
  }
27
37
  };
28
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModule","VerySDK","authenticate","config","raw","sdkKey","userId","language","themeMode","presentationStyle","livenessMode","debugLogging","code","signedToken","undefined","error","errorMessage","isSuccess","isSupported"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,iBAAiB;AAK1C,OAAO,MAAMC,OAAO,GAAG;EACrB,MAAMC,YAAYA,CAACC,MAAkB,EAAuB;IAC1D,MAAMC,GAAG,GAAI,MAAMJ,YAAY,CAACE,YAAY,CAAC;MAC3CG,MAAM,EAAEF,MAAM,CAACE,MAAM;MACrBC,MAAM,EAAEH,MAAM,CAACG,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAEJ,MAAM,CAACI,QAAQ,IAAI,IAAI;MACjCC,SAAS,EAAEL,MAAM,CAACK,SAAS,IAAI,MAAM;MACrCC,iBAAiB,EAAEN,MAAM,CAACM,iBAAiB,IAAI,YAAY;MAC3DC,YAAY,EAAEP,MAAM,CAACO,YAAY,IAAI,IAAI;MACzCC,YAAY,EAAER,MAAM,CAACQ,YAAY,IAAI;IACvC,CAAC,CAA6B;IAC9B,OAAO;MACLC,IAAI,EAAER,GAAG,CAACQ,IAAc;MACxBN,MAAM,EAAEF,GAAG,CAACE,MAAgB;MAC5BO,WAAW,EAAGT,GAAG,CAACS,WAAW,IAAeC,SAAS;MACrDC,KAAK,EAAGX,GAAG,CAACW,KAAK,IAAeD,SAAS;MACzCE,YAAY,EAAGZ,GAAG,CAACY,YAAY,IAAeF,SAAS;MACvDG,SAAS,EAAEb,GAAG,CAACa;IACjB,CAAC;EACH,CAAC;EAED,MAAMC,WAAWA,CAAA,EAAqB;IACpC,OAAOlB,YAAY,CAACkB,WAAW,CAAC,CAAC;EACnC;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["NativeModule","VerySDK","authenticate","config","raw","sdkKey","userId","language","themeMode","presentationStyle","livenessMode","debugLogging","code","signedToken","undefined","error","errorMessage","isSuccess","isSupported","prefetch"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,iBAAiB;AAK1C,OAAO,MAAMC,OAAO,GAAG;EACrB,MAAMC,YAAYA,CAACC,MAAkB,EAAuB;IAC1D,MAAMC,GAAG,GAAI,MAAMJ,YAAY,CAACE,YAAY,CAAC;MAC3CG,MAAM,EAAEF,MAAM,CAACE,MAAM;MACrBC,MAAM,EAAEH,MAAM,CAACG,MAAM,IAAI,IAAI;MAC7BC,QAAQ,EAAEJ,MAAM,CAACI,QAAQ,IAAI,IAAI;MACjCC,SAAS,EAAEL,MAAM,CAACK,SAAS,IAAI,MAAM;MACrCC,iBAAiB,EAAEN,MAAM,CAACM,iBAAiB,IAAI,YAAY;MAC3DC,YAAY,EAAEP,MAAM,CAACO,YAAY,IAAI,IAAI;MACzCC,YAAY,EAAER,MAAM,CAACQ,YAAY,IAAI;IACvC,CAAC,CAA6B;IAC9B,OAAO;MACLC,IAAI,EAAER,GAAG,CAACQ,IAAc;MACxBN,MAAM,EAAEF,GAAG,CAACE,MAAgB;MAC5BO,WAAW,EAAGT,GAAG,CAACS,WAAW,IAAeC,SAAS;MACrDC,KAAK,EAAGX,GAAG,CAACW,KAAK,IAAeD,SAAS;MACzCE,YAAY,EAAGZ,GAAG,CAACY,YAAY,IAAeF,SAAS;MACvDG,SAAS,EAAEb,GAAG,CAACa;IACjB,CAAC;EACH,CAAC;EAED,MAAMC,WAAWA,CAAA,EAAqB;IACpC,OAAOlB,YAAY,CAACkB,WAAW,CAAC,CAAC;EACnC,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,QAAQA,CAAA,EAAkB;IAC9B,OAAOnB,YAAY,CAACmB,QAAQ,CAAC,CAAC;EAChC;AACF,CAAC","ignoreList":[]}
@@ -2,6 +2,7 @@ import type { TurboModule } from 'react-native';
2
2
  export interface Spec extends TurboModule {
3
3
  authenticate(config: Object): Promise<Object>;
4
4
  isSupported(): Promise<boolean>;
5
+ prefetch(): Promise<void>;
5
6
  }
6
7
  declare const _default: Spec;
7
8
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeVerySDK.d.ts","sourceRoot":"","sources":["../../src/NativeVerySDK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACjC;;AAED,wBAAmE"}
1
+ {"version":3,"file":"NativeVerySDK.d.ts","sourceRoot":"","sources":["../../src/NativeVerySDK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;;AAED,wBAAmE"}
@@ -3,5 +3,13 @@ export type { VeryConfig, VeryResult };
3
3
  export declare const VerySDK: {
4
4
  authenticate(config: VeryConfig): Promise<VeryResult>;
5
5
  isSupported(): Promise<boolean>;
6
+ /**
7
+ * Warm up the palm-scan model/native-lib download ahead of
8
+ * {@link authenticate}. Fire-and-forget and safe to call repeatedly; a
9
+ * no-op once the asset is bundled or cached. Call it early (e.g. on app
10
+ * launch) so the download runs while the user is elsewhere instead of
11
+ * blocking the first scan.
12
+ */
13
+ prefetch(): Promise<void>;
6
14
  };
7
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAEvC,eAAO,MAAM,OAAO;yBACS,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;mBAoBtC,OAAO,CAAC,OAAO,CAAC;CAGtC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAEvC,eAAO,MAAM,OAAO;yBACS,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;mBAoBtC,OAAO,CAAC,OAAO,CAAC;IAIrC;;;;;;OAMG;gBACe,OAAO,CAAC,IAAI,CAAC;CAGhC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veryai/react-native-sdk",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "React Native wrapper for Very SDK - Palm biometrics verification",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -4,6 +4,7 @@ import { TurboModuleRegistry } from 'react-native';
4
4
  export interface Spec extends TurboModule {
5
5
  authenticate(config: Object): Promise<Object>;
6
6
  isSupported(): Promise<boolean>;
7
+ prefetch(): Promise<void>;
7
8
  }
8
9
 
9
10
  export default TurboModuleRegistry.getEnforcing<Spec>('VerySDKRN');
package/src/index.tsx CHANGED
@@ -27,4 +27,15 @@ export const VerySDK = {
27
27
  async isSupported(): Promise<boolean> {
28
28
  return NativeModule.isSupported();
29
29
  },
30
+
31
+ /**
32
+ * Warm up the palm-scan model/native-lib download ahead of
33
+ * {@link authenticate}. Fire-and-forget and safe to call repeatedly; a
34
+ * no-op once the asset is bundled or cached. Call it early (e.g. on app
35
+ * launch) so the download runs while the user is elsewhere instead of
36
+ * blocking the first scan.
37
+ */
38
+ async prefetch(): Promise<void> {
39
+ return NativeModule.prefetch();
40
+ },
30
41
  };
@@ -1,6 +1,16 @@
1
1
  require 'json'
2
2
  package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
3
3
 
4
+ # SDK dependency version — never hardcoded. Track the repo-root VERSION file
5
+ # (single source of truth, same value CI publishes for iOS/Android) when the
6
+ # pod is built from this repo; fall back to this wrapper's own version (which
7
+ # CI sets equal to the released SDK version) if VERSION isn't present.
8
+ very_sdk_version = begin
9
+ File.read(File.join(__dir__, '..', 'VERSION')).strip
10
+ rescue
11
+ package["version"]
12
+ end
13
+
4
14
  Pod::Spec.new do |s|
5
15
  s.name = "veryai-react-native-sdk"
6
16
  s.version = package["version"]
@@ -25,11 +35,7 @@ Pod::Spec.new do |s|
25
35
 
26
36
  s.subspec 'Core' do |core|
27
37
  core.source_files = "ios/**/*.{swift,h,m,mm}"
28
- # `~>` (pessimistic version constraint) instead of `>=, <` so the
29
- # CI sed in .github/workflows/release.yml can rewrite the version
30
- # on each release. The two forms are functionally similar within
31
- # a minor: `~> 1.0.39` ≡ `>= 1.0.39, < 1.1.0`.
32
- core.dependency "VerySDK/Core", "1.0.53"
38
+ core.dependency "VerySDK/Core", very_sdk_version
33
39
 
34
40
  if respond_to?(:install_modules_dependencies, true)
35
41
  install_modules_dependencies(core)
@@ -40,6 +46,6 @@ Pod::Spec.new do |s|
40
46
 
41
47
  s.subspec 'Bundled' do |bundled|
42
48
  bundled.dependency 'veryai-react-native-sdk/Core'
43
- bundled.dependency 'VerySDK/Bundled', "1.0.53"
49
+ bundled.dependency 'VerySDK/Bundled', very_sdk_version
44
50
  end
45
51
  end