@smileid/usesmileid_vision_face 12.3.1-SNAPSHOT.75 → 12.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  Full release notes: [Smile ID docs](https://docs.usesmileid.com/developer-resources/sdks/mobile/release-notes/react-native-expo).
2
2
 
3
+ ## 12.4.0
4
+
5
+ See the repository CHANGELOG for the 12.4.0 release notes.
6
+
7
+
3
8
  ## 12.3.0
4
9
 
5
10
  See the repository CHANGELOG for the 12.3.0 release notes.
@@ -16,23 +16,37 @@ public class UseSmileIDVisionFaceModule: Module {
16
16
  /// The debug HUD's camera frame count.
17
17
  private let cameraFrames = UseSmileIDVisionFaceCameraFrames()
18
18
 
19
+ /// A new session folder under the capture root, `Application Support/UseSmileID`: not Caches, so
20
+ /// the OS cannot evict in-flight frames between capture and submission. The root is excluded from
21
+ /// iCloud and Finder backup before any session folder is made below it. When it can't be made or
22
+ /// excluded, the session goes under the temporary directory, which no backup takes, so a frame
23
+ /// never lands where a backup would copy it (MASVS-STORAGE-2). iOS may clear that folder while
24
+ /// the app isn't running, so a capture kept there for a later upload can be gone by then.
19
25
  private static func freshSessionDirectory() -> URL {
20
- // Application Support — not Caches — so the OS cannot evict
21
- // in-flight capture frames between capture and submission under
22
- // memory pressure. The root is flagged out of iCloud / iTunes
23
- // backup so biometric frames never leave the device.
24
- let support = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first
25
- ?? FileManager.default.temporaryDirectory
26
- var root = support.appendingPathComponent("UseSmileID", isDirectory: true)
27
- try? FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
28
- var resourceValues = URLResourceValues()
29
- resourceValues.isExcludedFromBackup = true
30
- try? root.setResourceValues(resourceValues)
26
+ let fileManager = FileManager.default
27
+ let support = fileManager.urls(for: .applicationSupportDirectory, in: .userDomainMask).first
28
+ let root = excludedCaptureRoot(under: support)
29
+ ?? fileManager.temporaryDirectory.appendingPathComponent("UseSmileID", isDirectory: true)
31
30
  let dir = root.appendingPathComponent(String(Int(Date().timeIntervalSince1970 * 1000)), isDirectory: true)
32
- try? FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)
31
+ try? fileManager.createDirectory(at: dir, withIntermediateDirectories: true)
33
32
  return dir
34
33
  }
35
34
 
35
+ /// `UseSmileID` under `support`, made and excluded from backup, or nil when either step fails.
36
+ private static func excludedCaptureRoot(under support: URL?) -> URL? {
37
+ guard let support else { return nil }
38
+ var root = support.appendingPathComponent("UseSmileID", isDirectory: true)
39
+ do {
40
+ try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
41
+ var resourceValues = URLResourceValues()
42
+ resourceValues.isExcludedFromBackup = true
43
+ try root.setResourceValues(resourceValues)
44
+ return root
45
+ } catch {
46
+ return nil
47
+ }
48
+ }
49
+
36
50
  public func definition() -> ModuleDefinition {
37
51
  Name("UseSmileIDVisionFace")
38
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smileid/usesmileid_vision_face",
3
- "version": "12.3.1-SNAPSHOT.75",
3
+ "version": "12.4.0",
4
4
  "description": "Apple Vision face detection implementation for the UseSmileID React Native (Expo) SDK.",
5
5
  "homepage": "https://usesmileid.com",
6
6
  "repository": {
@@ -46,8 +46,8 @@
46
46
  "CHANGELOG.md"
47
47
  ],
48
48
  "dependencies": {
49
- "@smileid/usesmileid_bridge": "12.3.1-SNAPSHOT.75",
50
- "@smileid/usesmileid_platform_interface": "12.3.1-SNAPSHOT.75"
49
+ "@smileid/usesmileid_bridge": "12.4.0",
50
+ "@smileid/usesmileid_platform_interface": "12.4.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "expo": ">=56.0.0",
@@ -57,7 +57,7 @@
57
57
  "devDependencies": {
58
58
  "@types/node": "^26.6.4",
59
59
  "expo": "~57.0.26",
60
- "expo-modules-core": "^57.0.23",
60
+ "expo-modules-core": "^57.0.24",
61
61
  "react-native": "^0.86.3",
62
62
  "typescript": "^6.0.3"
63
63
  },