@onefootprint/footprint-native-camera-module 0.1.0 → 0.1.2
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/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/Info.plist +5 -9
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64/FootprintNativeCamera.framework/FootprintNativeCamera +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64/FootprintNativeCamera.framework/Headers/FootprintNativeCamera.h +11 -4
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCamera.framework/FootprintNativeCamera +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCamera.framework/Headers/FootprintNativeCamera.h +11 -4
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/Assets.car +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/Info.plist +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/Info.plist +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios.abi.json +903 -85
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios.private.swiftinterface +19 -5
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios.swiftinterface +19 -5
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/Assets.car +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/Info.plist +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/_CodeSignature/CodeDirectory +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/_CodeSignature/CodeResources +2 -2
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Info.plist +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios-simulator.abi.json +903 -85
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +19 -5
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios-simulator.swiftinterface +19 -5
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/x86_64-apple-ios-simulator.abi.json +903 -85
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +19 -5
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +19 -5
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/_CodeSignature/CodeResources +1 -1
- package/FootprintNativeCameraSwift.podspec +1 -1
- package/README.md +21 -65
- package/android/libs/footprint-native-camera-module.aar +0 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
2
|
// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
|
|
3
|
-
// swift-module-flags: -target x86_64-apple-
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name FootprintNativeCameraSwift -package-name footprintnativecameraswift
|
|
4
4
|
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import Combine
|
|
@@ -26,13 +26,25 @@ import _StringProcessing
|
|
|
26
26
|
import _SwiftConcurrencyShims
|
|
27
27
|
public class AutocaptureManager {
|
|
28
28
|
public init()
|
|
29
|
-
public func detectForAutoCapture(_ image: CoreVideo.CVPixelBuffer, orientation: ImageIO.CGImagePropertyOrientation, side: Swift.String) -> Swift.String
|
|
29
|
+
public func detectForAutoCapture(_ image: CoreVideo.CVPixelBuffer, orientation: ImageIO.CGImagePropertyOrientation, side: Swift.String, isPassport: Swift.Bool = false) -> Swift.String
|
|
30
30
|
@objc deinit
|
|
31
31
|
}
|
|
32
32
|
public struct CameraConstants {
|
|
33
33
|
public let deviceToFrameWidthRatioPortraitDoc: CoreFoundation.CGFloat
|
|
34
34
|
public let deviceToFrameWidthRatioLandscapeDoc: CoreFoundation.CGFloat
|
|
35
35
|
public let deviceToFrameRatioSelfie: CoreFoundation.CGFloat
|
|
36
|
+
public let documentBoxHeightRatioCard: CoreFoundation.CGFloat
|
|
37
|
+
public let documentBoxHeightRatioPassport: CoreFoundation.CGFloat
|
|
38
|
+
public let documentCenteringMargin: CoreFoundation.CGFloat
|
|
39
|
+
public let documentAcceptFillFactor: CoreFoundation.CGFloat
|
|
40
|
+
public let documentMaxFillFactor: CoreFoundation.CGFloat
|
|
41
|
+
public let documentAcceptFillFactorPassport: CoreFoundation.CGFloat
|
|
42
|
+
public let documentMaxFillFactorPassport: CoreFoundation.CGFloat
|
|
43
|
+
public let documentCenteringMarginPassport: CoreFoundation.CGFloat
|
|
44
|
+
public let motionAccelerationThresholdPassport: Swift.Double
|
|
45
|
+
public let autocaptureGracePeriod: Swift.Double
|
|
46
|
+
public let autocaptureGracePeriodPassport: Swift.Double
|
|
47
|
+
public let motionAccelerationThreshold: Swift.Double
|
|
36
48
|
public init()
|
|
37
49
|
}
|
|
38
50
|
public enum CameraError : Swift.Error {
|
|
@@ -57,7 +69,7 @@ public enum CameraError : Swift.Error {
|
|
|
57
69
|
}
|
|
58
70
|
final public let orientationHelper: FootprintNativeCameraSwift.CameraOrientationHelper
|
|
59
71
|
@objc override dynamic public init()
|
|
60
|
-
public func setupCaptureSession() throws
|
|
72
|
+
public func setupCaptureSession(position: AVFoundation.AVCaptureDevice.Position = .back) throws
|
|
61
73
|
public func setupDetection(processFrame: @escaping (CoreVideo.CVImageBuffer, ImageIO.CGImagePropertyOrientation) -> Swift.Void)
|
|
62
74
|
public func switchToFrontCamera()
|
|
63
75
|
public func capturePhoto(completion: @escaping (Swift.Result<AVFoundation.AVCapturePhoto, FootprintNativeCameraSwift.CameraError>) -> Swift.Void)
|
|
@@ -162,10 +174,12 @@ public struct CaptureTokens {
|
|
|
162
174
|
public let backgroundColor: FootprintNativeCameraSwift.CaptureTokens.BackgroundColor
|
|
163
175
|
public let textColor: FootprintNativeCameraSwift.CaptureTokens.TextColor
|
|
164
176
|
public let borderColor: FootprintNativeCameraSwift.CaptureTokens.BorderColor
|
|
165
|
-
public init(accent: SwiftUICore.Color = Color(fpHex:
|
|
177
|
+
public init(accent: SwiftUICore.Color = Color(fpHex: 0xFF387F7F))
|
|
166
178
|
}
|
|
167
179
|
extension SwiftUICore.Color {
|
|
168
180
|
public init(fpHex hex: Swift.UInt32)
|
|
181
|
+
public init(fpHex light: Swift.UInt32, dark: Swift.UInt32)
|
|
182
|
+
public init?(fpHexString hex: Swift.String?)
|
|
169
183
|
}
|
|
170
184
|
final public class CameraCaptureViewModel : Combine.ObservableObject, @unchecked Swift.Sendable {
|
|
171
185
|
@Combine.Published<FootprintNativeCamera.CameraCaptureState> @_projectedValueProperty($cameraCaptureState) final public var cameraCaptureState: FootprintNativeCamera.CameraCaptureState {
|
|
@@ -358,7 +372,7 @@ public enum CaptureButtonVariant {
|
|
|
358
372
|
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift21CapturePreviewOverlayV4bodyQrvp", 0) __
|
|
359
373
|
}
|
|
360
374
|
@_Concurrency.MainActor @preconcurrency public struct CountdownView : SwiftUICore.View {
|
|
361
|
-
@_Concurrency.MainActor @preconcurrency public init(shouldRun: SwiftUICore.Binding<Swift.Bool>, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), onComplete: @escaping () -> Swift.Void)
|
|
375
|
+
@_Concurrency.MainActor @preconcurrency public init(shouldRun: SwiftUICore.Binding<Swift.Bool>, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), isPassport: Swift.Bool = false, onComplete: @escaping () -> Swift.Void)
|
|
362
376
|
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
363
377
|
get
|
|
364
378
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
2
|
// swift-compiler-version: Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
|
|
3
|
-
// swift-module-flags: -target x86_64-apple-
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name FootprintNativeCameraSwift -package-name footprintnativecameraswift
|
|
4
4
|
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import Combine
|
|
@@ -26,13 +26,25 @@ import _StringProcessing
|
|
|
26
26
|
import _SwiftConcurrencyShims
|
|
27
27
|
public class AutocaptureManager {
|
|
28
28
|
public init()
|
|
29
|
-
public func detectForAutoCapture(_ image: CoreVideo.CVPixelBuffer, orientation: ImageIO.CGImagePropertyOrientation, side: Swift.String) -> Swift.String
|
|
29
|
+
public func detectForAutoCapture(_ image: CoreVideo.CVPixelBuffer, orientation: ImageIO.CGImagePropertyOrientation, side: Swift.String, isPassport: Swift.Bool = false) -> Swift.String
|
|
30
30
|
@objc deinit
|
|
31
31
|
}
|
|
32
32
|
public struct CameraConstants {
|
|
33
33
|
public let deviceToFrameWidthRatioPortraitDoc: CoreFoundation.CGFloat
|
|
34
34
|
public let deviceToFrameWidthRatioLandscapeDoc: CoreFoundation.CGFloat
|
|
35
35
|
public let deviceToFrameRatioSelfie: CoreFoundation.CGFloat
|
|
36
|
+
public let documentBoxHeightRatioCard: CoreFoundation.CGFloat
|
|
37
|
+
public let documentBoxHeightRatioPassport: CoreFoundation.CGFloat
|
|
38
|
+
public let documentCenteringMargin: CoreFoundation.CGFloat
|
|
39
|
+
public let documentAcceptFillFactor: CoreFoundation.CGFloat
|
|
40
|
+
public let documentMaxFillFactor: CoreFoundation.CGFloat
|
|
41
|
+
public let documentAcceptFillFactorPassport: CoreFoundation.CGFloat
|
|
42
|
+
public let documentMaxFillFactorPassport: CoreFoundation.CGFloat
|
|
43
|
+
public let documentCenteringMarginPassport: CoreFoundation.CGFloat
|
|
44
|
+
public let motionAccelerationThresholdPassport: Swift.Double
|
|
45
|
+
public let autocaptureGracePeriod: Swift.Double
|
|
46
|
+
public let autocaptureGracePeriodPassport: Swift.Double
|
|
47
|
+
public let motionAccelerationThreshold: Swift.Double
|
|
36
48
|
public init()
|
|
37
49
|
}
|
|
38
50
|
public enum CameraError : Swift.Error {
|
|
@@ -57,7 +69,7 @@ public enum CameraError : Swift.Error {
|
|
|
57
69
|
}
|
|
58
70
|
final public let orientationHelper: FootprintNativeCameraSwift.CameraOrientationHelper
|
|
59
71
|
@objc override dynamic public init()
|
|
60
|
-
public func setupCaptureSession() throws
|
|
72
|
+
public func setupCaptureSession(position: AVFoundation.AVCaptureDevice.Position = .back) throws
|
|
61
73
|
public func setupDetection(processFrame: @escaping (CoreVideo.CVImageBuffer, ImageIO.CGImagePropertyOrientation) -> Swift.Void)
|
|
62
74
|
public func switchToFrontCamera()
|
|
63
75
|
public func capturePhoto(completion: @escaping (Swift.Result<AVFoundation.AVCapturePhoto, FootprintNativeCameraSwift.CameraError>) -> Swift.Void)
|
|
@@ -162,10 +174,12 @@ public struct CaptureTokens {
|
|
|
162
174
|
public let backgroundColor: FootprintNativeCameraSwift.CaptureTokens.BackgroundColor
|
|
163
175
|
public let textColor: FootprintNativeCameraSwift.CaptureTokens.TextColor
|
|
164
176
|
public let borderColor: FootprintNativeCameraSwift.CaptureTokens.BorderColor
|
|
165
|
-
public init(accent: SwiftUICore.Color = Color(fpHex:
|
|
177
|
+
public init(accent: SwiftUICore.Color = Color(fpHex: 0xFF387F7F))
|
|
166
178
|
}
|
|
167
179
|
extension SwiftUICore.Color {
|
|
168
180
|
public init(fpHex hex: Swift.UInt32)
|
|
181
|
+
public init(fpHex light: Swift.UInt32, dark: Swift.UInt32)
|
|
182
|
+
public init?(fpHexString hex: Swift.String?)
|
|
169
183
|
}
|
|
170
184
|
final public class CameraCaptureViewModel : Combine.ObservableObject, @unchecked Swift.Sendable {
|
|
171
185
|
@Combine.Published<FootprintNativeCamera.CameraCaptureState> @_projectedValueProperty($cameraCaptureState) final public var cameraCaptureState: FootprintNativeCamera.CameraCaptureState {
|
|
@@ -358,7 +372,7 @@ public enum CaptureButtonVariant {
|
|
|
358
372
|
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift21CapturePreviewOverlayV4bodyQrvp", 0) __
|
|
359
373
|
}
|
|
360
374
|
@_Concurrency.MainActor @preconcurrency public struct CountdownView : SwiftUICore.View {
|
|
361
|
-
@_Concurrency.MainActor @preconcurrency public init(shouldRun: SwiftUICore.Binding<Swift.Bool>, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), onComplete: @escaping () -> Swift.Void)
|
|
375
|
+
@_Concurrency.MainActor @preconcurrency public init(shouldRun: SwiftUICore.Binding<Swift.Bool>, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), isPassport: Swift.Bool = false, onComplete: @escaping () -> Swift.Void)
|
|
362
376
|
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
363
377
|
get
|
|
364
378
|
}
|
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = 'Footprint'
|
|
12
12
|
s.homepage = 'https://onefootprint.com'
|
|
13
|
-
s.platforms = { :ios => '
|
|
13
|
+
s.platforms = { :ios => '14.0' }
|
|
14
14
|
s.swift_version = '5.9'
|
|
15
15
|
s.source = { git: '' }
|
|
16
16
|
s.static_framework = true
|
package/README.md
CHANGED
|
@@ -1,78 +1,34 @@
|
|
|
1
|
-
# footprint-native-camera-module
|
|
1
|
+
# @onefootprint/footprint-native-camera-module
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Native document-capture implementation — camera, auto-capture, and on-device
|
|
4
|
+
detection — for [Footprint](https://www.onefootprint.com)'s Expo SDK. It ships the
|
|
5
|
+
compiled iOS and Android binaries and is consumed through
|
|
6
|
+
[`@onefootprint/footprint-expo-camera-module`](https://www.npmjs.com/package/@onefootprint/footprint-expo-camera-module);
|
|
7
|
+
you don't call it directly.
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
- `@onefootprint/footprint-expo-camera-module` — via React Native autolinking (iOS podspec + Android gradle subproject), for the Expo SDK's native document capture.
|
|
9
|
+
## Install
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
| File | What |
|
|
11
|
-
|---|---|
|
|
12
|
-
| `CameraCaptureState.kt` / `CaptureMode.kt` / `AutoCaptureStatus.kt` | Camera/capture state enums (`.value: String` for cross-runtime mapping). |
|
|
13
|
-
| `DocumentSide.kt` | `typealias DocumentSide = String` + `DocumentSides` constants. |
|
|
14
|
-
| `CaptureAppearance.kt` / `CaptureTheme.kt` | Theme contract painted by the capture screen. Built via `CaptureAppearance.fromVariables(...)` from the broader `Appearance.variables` bag. |
|
|
15
|
-
| `CaptureCopy.kt` / `CaptureTranslations.kt` | Localized copy table keyed by language code. |
|
|
16
|
-
| `CaptureUploadClient.kt` | Interface for per-side upload + process. Adapters provided by consumers. |
|
|
17
|
-
|
|
18
|
-
## Public surface (Android)
|
|
19
|
-
|
|
20
|
-
| File | What |
|
|
21
|
-
|---|---|
|
|
22
|
-
| `DocumentCaptureScreen.kt` | Compose screen. Same name as iOS's SwiftUI view. |
|
|
23
|
-
| `DocumentCaptureActivity.kt` | Hosts the Compose screen. Declared in this module's `AndroidManifest.xml`; merged into consumer apps automatically. |
|
|
24
|
-
| `DocumentCaptureContract.kt` | `ActivityResultContract<DocumentCaptureInput, DocumentCaptureOutcome>`. |
|
|
25
|
-
| `AutocaptureManager.kt` / `DocumentDetection.kt` / `FaceDetection.kt` | Per-frame detection. |
|
|
26
|
-
|
|
27
|
-
## Public surface (iOS — via `FootprintNativeCameraSwift/Sources/`)
|
|
28
|
-
|
|
29
|
-
| File | What |
|
|
30
|
-
|---|---|
|
|
31
|
-
| `DocumentCaptureScreen.swift` | SwiftUI view. Wrap in `UIHostingController` from UIKit hosts. |
|
|
32
|
-
| `CameraManager.swift` / `AutocaptureManager.swift` / `CameraPreview.swift` / `PhotoPicker.swift` | Capture primitives. |
|
|
33
|
-
|
|
34
|
-
## Distribution
|
|
35
|
-
|
|
36
|
-
| Target | How |
|
|
37
|
-
|---|---|
|
|
38
|
-
| HandoffSwift (iOS) | Consumes `FootprintNativeCameraSwift/Package.swift` (SwiftPM). |
|
|
39
|
-
| HandoffSharedLogic (Android) | Composite Gradle build — `includeBuild("../footprint-native-camera-module")` in `HandoffSharedLogic/settings.gradle.kts`. |
|
|
40
|
-
| Expo bridge (both) | React Native autolinking via `react-native.config.js` → `FootprintNativeCameraSwift.podspec` (iOS) + `android/build.gradle` (Android). |
|
|
41
|
-
|
|
42
|
-
## Build
|
|
11
|
+
Install it together with the camera bridge and the SDK:
|
|
43
12
|
|
|
44
13
|
```sh
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
14
|
+
npm install @onefootprint/footprint-expo \
|
|
15
|
+
@onefootprint/footprint-expo-camera-module \
|
|
16
|
+
@onefootprint/footprint-native-camera-module
|
|
48
17
|
```
|
|
49
18
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- Both are gitignored and regenerated from source.
|
|
54
|
-
|
|
55
|
-
## Dev workflow
|
|
19
|
+
React Native autolinking wires up the native code automatically (iOS podspec +
|
|
20
|
+
Android Gradle) — there's no manual native setup. Run `npx expo prebuild --clean`
|
|
21
|
+
after installing.
|
|
56
22
|
|
|
57
|
-
|
|
23
|
+
## Documentation
|
|
58
24
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
pnpm build:native # rebuilds xcframework + AAR
|
|
62
|
-
yalc publish # pushes to local yalc store
|
|
63
|
-
|
|
64
|
-
# In any consumer (footprint-expo-camera-module, ...):
|
|
65
|
-
yalc update # pulls the latest from yalc
|
|
66
|
-
pnpm install
|
|
67
|
-
```
|
|
25
|
+
See the **[native onboarding guide](https://docs.onefootprint.com/articles/sdks/expo-native)**
|
|
26
|
+
for the full integration (initialize → identify → collect → process).
|
|
68
27
|
|
|
69
|
-
|
|
28
|
+
## Requirements
|
|
70
29
|
|
|
71
|
-
|
|
30
|
+
Expo SDK 53+, React 19+, React Native 0.70+.
|
|
72
31
|
|
|
73
|
-
|
|
74
|
-
workflow (macOS runner, npm OIDC trusted publishing). `prepack` runs `build:native`, so the
|
|
75
|
-
gitignored xcframeworks + AAR are rebuilt from source and packed into the tarball. Preview the
|
|
76
|
-
tarball contents with `npm pack --dry-run`.
|
|
32
|
+
## License
|
|
77
33
|
|
|
78
|
-
|
|
34
|
+
MIT
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onefootprint/footprint-native-camera-module",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Native KMM camera module: detection, autocapture, and document capture UI for iOS + Android. Consumed by @onefootprint/footprint-expo-camera-module (the Expo bridge) and by HandoffSharedLogic.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|