@onefootprint/footprint-native-camera-module 0.0.1-bootstrap.0 → 0.1.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/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/Info.plist +48 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64/FootprintNativeCamera.framework/FootprintNativeCamera +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64/FootprintNativeCamera.framework/Headers/FootprintNativeCamera.h +1062 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64/FootprintNativeCamera.framework/Info.plist +35 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64/FootprintNativeCamera.framework/Modules/module.modulemap +8 -0
- 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 +1062 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCamera.framework/Info.plist +31 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCamera.framework/Modules/module.modulemap +5 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/Info.plist +44 -0
- 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 +12168 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios.private.swiftinterface +442 -0
- 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 +442 -0
- 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/CodeRequirements +0 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/_CodeSignature/CodeResources +109 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/FootprintNativeCameraSwift_FootprintNativeCameraSwift.bundle/_CodeSignature/CodeSignature +0 -0
- 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 +12168 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +442 -0
- 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 +442 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/x86_64-apple-ios-simulator.abi.json +12168 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/Modules/FootprintNativeCameraSwift.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +442 -0
- 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 +442 -0
- package/FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework/ios-arm64_x86_64-simulator/FootprintNativeCameraSwift.framework/_CodeSignature/CodeResources +101 -0
- package/FootprintNativeCameraSwift.podspec +37 -0
- package/README.md +77 -2
- package/android/build.gradle +63 -0
- package/android/libs/footprint-native-camera-module.aar +0 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/index.js +5 -0
- package/package.json +38 -3
- package/react-native.config.js +20 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
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-ios16.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 6 -O -enable-experimental-feature DebugDescriptionMacro -module-name FootprintNativeCameraSwift -package-name footprintnativecameraswift
|
|
4
|
+
// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
|
+
import AVFoundation
|
|
6
|
+
import Combine
|
|
7
|
+
import CoreFoundation
|
|
8
|
+
import CoreGraphics
|
|
9
|
+
import CoreImage
|
|
10
|
+
import CoreMotion
|
|
11
|
+
import CoreVideo
|
|
12
|
+
import DeveloperToolsSupport
|
|
13
|
+
import FootprintNativeCamera
|
|
14
|
+
import Foundation
|
|
15
|
+
import Foundation/*.Bundle*/
|
|
16
|
+
import Foundation/*.ProcessInfo*/
|
|
17
|
+
import Foundation/*.URL*/
|
|
18
|
+
import PhotosUI
|
|
19
|
+
import Swift
|
|
20
|
+
import SwiftUI
|
|
21
|
+
import UIKit
|
|
22
|
+
import Vision
|
|
23
|
+
import _Concurrency
|
|
24
|
+
import _PhotosUI_SwiftUI
|
|
25
|
+
import _StringProcessing
|
|
26
|
+
import _SwiftConcurrencyShims
|
|
27
|
+
public class AutocaptureManager {
|
|
28
|
+
public init()
|
|
29
|
+
public func detectForAutoCapture(_ image: CoreVideo.CVPixelBuffer, orientation: ImageIO.CGImagePropertyOrientation, side: Swift.String) -> Swift.String
|
|
30
|
+
@objc deinit
|
|
31
|
+
}
|
|
32
|
+
public struct CameraConstants {
|
|
33
|
+
public let deviceToFrameWidthRatioPortraitDoc: CoreFoundation.CGFloat
|
|
34
|
+
public let deviceToFrameWidthRatioLandscapeDoc: CoreFoundation.CGFloat
|
|
35
|
+
public let deviceToFrameRatioSelfie: CoreFoundation.CGFloat
|
|
36
|
+
public init()
|
|
37
|
+
}
|
|
38
|
+
public enum CameraError : Swift.Error {
|
|
39
|
+
case deviceUnavailable
|
|
40
|
+
case configurationFailed
|
|
41
|
+
case captureError(Swift.String)
|
|
42
|
+
case flashError(Swift.String)
|
|
43
|
+
case galleryPickerError(Swift.String)
|
|
44
|
+
}
|
|
45
|
+
@objc @_inheritsConvenienceInitializers public class CameraManager : ObjectiveC.NSObject, Combine.ObservableObject, @unchecked Swift.Sendable, AVFoundation.AVCaptureVideoDataOutputSampleBufferDelegate {
|
|
46
|
+
@Combine.Published<AVFoundation.AVCaptureSession> @_projectedValueProperty($session) public var session: AVFoundation.AVCaptureSession {
|
|
47
|
+
get
|
|
48
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
49
|
+
set
|
|
50
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
51
|
+
_modify
|
|
52
|
+
}
|
|
53
|
+
public var $session: Combine.Published<AVFoundation.AVCaptureSession>.Publisher {
|
|
54
|
+
get
|
|
55
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
56
|
+
set
|
|
57
|
+
}
|
|
58
|
+
final public let orientationHelper: FootprintNativeCameraSwift.CameraOrientationHelper
|
|
59
|
+
@objc override dynamic public init()
|
|
60
|
+
public func setupCaptureSession() throws
|
|
61
|
+
public func setupDetection(processFrame: @escaping (CoreVideo.CVImageBuffer, ImageIO.CGImagePropertyOrientation) -> Swift.Void)
|
|
62
|
+
public func switchToFrontCamera()
|
|
63
|
+
public func capturePhoto(completion: @escaping (Swift.Result<AVFoundation.AVCapturePhoto, FootprintNativeCameraSwift.CameraError>) -> Swift.Void)
|
|
64
|
+
@objc public func captureOutput(_ output: AVFoundation.AVCaptureOutput, didOutput sampleBuffer: CoreMedia.CMSampleBuffer, from connection: AVFoundation.AVCaptureConnection)
|
|
65
|
+
public func toggleFlash() -> Swift.Bool
|
|
66
|
+
public func stopSession()
|
|
67
|
+
@objc deinit
|
|
68
|
+
public typealias ObjectWillChangePublisher = Combine.ObservableObjectPublisher
|
|
69
|
+
}
|
|
70
|
+
extension FootprintNativeCameraSwift.CameraManager : AVFoundation.AVCapturePhotoCaptureDelegate {
|
|
71
|
+
@objc dynamic public func photoOutput(_ output: AVFoundation.AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVFoundation.AVCapturePhoto, error: (any Swift.Error)?)
|
|
72
|
+
}
|
|
73
|
+
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class CameraOrientationHelper : ObjectiveC.NSObject, @unchecked Swift.Sendable {
|
|
74
|
+
@objc deinit
|
|
75
|
+
}
|
|
76
|
+
@_Concurrency.MainActor @preconcurrency public struct CameraPreview : SwiftUI.UIViewRepresentable {
|
|
77
|
+
@_Concurrency.MainActor @preconcurrency public init(session: AVFoundation.AVCaptureSession, orientationHelper: FootprintNativeCameraSwift.CameraOrientationHelper)
|
|
78
|
+
@_Concurrency.MainActor @preconcurrency public func makeUIView(context: FootprintNativeCameraSwift.CameraPreview.Context) -> FootprintNativeCameraSwift.CameraPreview.PreviewView
|
|
79
|
+
@_Concurrency.MainActor @preconcurrency public func updateUIView(_ uiView: FootprintNativeCameraSwift.CameraPreview.PreviewView, context: FootprintNativeCameraSwift.CameraPreview.Context)
|
|
80
|
+
@objc @_inheritsConvenienceInitializers @_Concurrency.MainActor @preconcurrency public class PreviewView : UIKit.UIView {
|
|
81
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public class var layerClass: Swift.AnyClass {
|
|
82
|
+
@objc get
|
|
83
|
+
}
|
|
84
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init(frame: CoreFoundation.CGRect)
|
|
85
|
+
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
86
|
+
@objc deinit
|
|
87
|
+
}
|
|
88
|
+
public typealias Body = Swift.Never
|
|
89
|
+
public typealias Coordinator = Swift.Void
|
|
90
|
+
public typealias UIViewType = FootprintNativeCameraSwift.CameraPreview.PreviewView
|
|
91
|
+
}
|
|
92
|
+
public enum DocumentCaptureError : Swift.Error {
|
|
93
|
+
case cameraSetupFailed(underlying: any Swift.Error)
|
|
94
|
+
case cameraPermissionDenied
|
|
95
|
+
case photoEncodingFailed
|
|
96
|
+
case photoCaptureFailed(message: Swift.String)
|
|
97
|
+
case uploadFailed(code: Swift.String, message: Swift.String)
|
|
98
|
+
public var code: Swift.String {
|
|
99
|
+
get
|
|
100
|
+
}
|
|
101
|
+
public var message: Swift.String {
|
|
102
|
+
get
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
public struct CaptureTokens {
|
|
106
|
+
public struct Spacing {
|
|
107
|
+
public let spacing0: CoreFoundation.CGFloat
|
|
108
|
+
public let spacing1: CoreFoundation.CGFloat
|
|
109
|
+
public let spacing2: CoreFoundation.CGFloat
|
|
110
|
+
public let spacing3: CoreFoundation.CGFloat
|
|
111
|
+
public let spacing4: CoreFoundation.CGFloat
|
|
112
|
+
public let spacing5: CoreFoundation.CGFloat
|
|
113
|
+
public let spacing6: CoreFoundation.CGFloat
|
|
114
|
+
public let spacing7: CoreFoundation.CGFloat
|
|
115
|
+
public let spacing8: CoreFoundation.CGFloat
|
|
116
|
+
public let spacing9: CoreFoundation.CGFloat
|
|
117
|
+
public let spacing10: CoreFoundation.CGFloat
|
|
118
|
+
public let spacing11: CoreFoundation.CGFloat
|
|
119
|
+
public let spacing12: CoreFoundation.CGFloat
|
|
120
|
+
public let spacing13: CoreFoundation.CGFloat
|
|
121
|
+
public let spacing14: CoreFoundation.CGFloat
|
|
122
|
+
public let spacing15: CoreFoundation.CGFloat
|
|
123
|
+
}
|
|
124
|
+
public struct BorderRadius {
|
|
125
|
+
public let `default`: CoreFoundation.CGFloat
|
|
126
|
+
public let lg: CoreFoundation.CGFloat
|
|
127
|
+
public let xl: CoreFoundation.CGFloat
|
|
128
|
+
public let xxl: CoreFoundation.CGFloat
|
|
129
|
+
public let full: CoreFoundation.CGFloat
|
|
130
|
+
}
|
|
131
|
+
public struct BorderWidth {
|
|
132
|
+
public let `default`: CoreFoundation.CGFloat
|
|
133
|
+
public let lg: CoreFoundation.CGFloat
|
|
134
|
+
}
|
|
135
|
+
public struct Typography {
|
|
136
|
+
public let display2: SwiftUICore.Font
|
|
137
|
+
public let heading2: SwiftUICore.Font
|
|
138
|
+
public let body2: SwiftUICore.Font
|
|
139
|
+
public let label1: SwiftUICore.Font
|
|
140
|
+
public let label2: SwiftUICore.Font
|
|
141
|
+
public let label3: SwiftUICore.Font
|
|
142
|
+
}
|
|
143
|
+
public struct BackgroundColor {
|
|
144
|
+
public let primary: SwiftUICore.Color
|
|
145
|
+
public let secondary: SwiftUICore.Color
|
|
146
|
+
public let accent: SwiftUICore.Color
|
|
147
|
+
}
|
|
148
|
+
public struct TextColor {
|
|
149
|
+
public let primary: SwiftUICore.Color
|
|
150
|
+
public let secondary: SwiftUICore.Color
|
|
151
|
+
public let quinary: SwiftUICore.Color
|
|
152
|
+
public let error: SwiftUICore.Color
|
|
153
|
+
}
|
|
154
|
+
public struct BorderColor {
|
|
155
|
+
public let transparent: SwiftUICore.Color
|
|
156
|
+
public let tertiary: SwiftUICore.Color
|
|
157
|
+
}
|
|
158
|
+
public let spacing: FootprintNativeCameraSwift.CaptureTokens.Spacing
|
|
159
|
+
public let borderRadius: FootprintNativeCameraSwift.CaptureTokens.BorderRadius
|
|
160
|
+
public let borderWidth: FootprintNativeCameraSwift.CaptureTokens.BorderWidth
|
|
161
|
+
public let typography: FootprintNativeCameraSwift.CaptureTokens.Typography
|
|
162
|
+
public let backgroundColor: FootprintNativeCameraSwift.CaptureTokens.BackgroundColor
|
|
163
|
+
public let textColor: FootprintNativeCameraSwift.CaptureTokens.TextColor
|
|
164
|
+
public let borderColor: FootprintNativeCameraSwift.CaptureTokens.BorderColor
|
|
165
|
+
public init(accent: SwiftUICore.Color = Color(fpHex: 0xFF4A24DB))
|
|
166
|
+
}
|
|
167
|
+
extension SwiftUICore.Color {
|
|
168
|
+
public init(fpHex hex: Swift.UInt32)
|
|
169
|
+
}
|
|
170
|
+
final public class CameraCaptureViewModel : Combine.ObservableObject, @unchecked Swift.Sendable {
|
|
171
|
+
@Combine.Published<FootprintNativeCamera.CameraCaptureState> @_projectedValueProperty($cameraCaptureState) final public var cameraCaptureState: FootprintNativeCamera.CameraCaptureState {
|
|
172
|
+
get
|
|
173
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
174
|
+
set
|
|
175
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
176
|
+
_modify
|
|
177
|
+
}
|
|
178
|
+
final public var $cameraCaptureState: Combine.Published<FootprintNativeCamera.CameraCaptureState>.Publisher {
|
|
179
|
+
get
|
|
180
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
181
|
+
set
|
|
182
|
+
}
|
|
183
|
+
@Combine.Published<Swift.String> @_projectedValueProperty($cameraStep) final public var cameraStep: Swift.String {
|
|
184
|
+
get
|
|
185
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
186
|
+
set
|
|
187
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
188
|
+
_modify
|
|
189
|
+
}
|
|
190
|
+
final public var $cameraStep: Combine.Published<Swift.String>.Publisher {
|
|
191
|
+
get
|
|
192
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
193
|
+
set
|
|
194
|
+
}
|
|
195
|
+
@Combine.Published<FootprintNativeCamera.CaptureMode> @_projectedValueProperty($captureMode) final public var captureMode: FootprintNativeCamera.CaptureMode {
|
|
196
|
+
get
|
|
197
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
198
|
+
set
|
|
199
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
200
|
+
_modify
|
|
201
|
+
}
|
|
202
|
+
final public var $captureMode: Combine.Published<FootprintNativeCamera.CaptureMode>.Publisher {
|
|
203
|
+
get
|
|
204
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
205
|
+
set
|
|
206
|
+
}
|
|
207
|
+
@Combine.Published<[FootprintNativeCamera.CaptureImageError]> @_projectedValueProperty($imageErrors) final public var imageErrors: [FootprintNativeCamera.CaptureImageError] {
|
|
208
|
+
get
|
|
209
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
210
|
+
set
|
|
211
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
212
|
+
_modify
|
|
213
|
+
}
|
|
214
|
+
final public var $imageErrors: Combine.Published<[FootprintNativeCamera.CaptureImageError]>.Publisher {
|
|
215
|
+
get
|
|
216
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
217
|
+
set
|
|
218
|
+
}
|
|
219
|
+
@Combine.Published<FootprintNativeCamera.AutoCaptureStatus> @_projectedValueProperty($autoCaptureStatus) final public var autoCaptureStatus: FootprintNativeCamera.AutoCaptureStatus {
|
|
220
|
+
get
|
|
221
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
222
|
+
set
|
|
223
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
224
|
+
_modify
|
|
225
|
+
}
|
|
226
|
+
final public var $autoCaptureStatus: Combine.Published<FootprintNativeCamera.AutoCaptureStatus>.Publisher {
|
|
227
|
+
get
|
|
228
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
229
|
+
set
|
|
230
|
+
}
|
|
231
|
+
@Combine.Published<Swift.Bool> @_projectedValueProperty($isRetryLimitExceeded) final public var isRetryLimitExceeded: Swift.Bool {
|
|
232
|
+
get
|
|
233
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
234
|
+
set
|
|
235
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
236
|
+
_modify
|
|
237
|
+
}
|
|
238
|
+
final public var $isRetryLimitExceeded: Combine.Published<Swift.Bool>.Publisher {
|
|
239
|
+
get
|
|
240
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
241
|
+
set
|
|
242
|
+
}
|
|
243
|
+
@Combine.Published<UIKit.UIImage?> @_projectedValueProperty($imagePreview) final public var imagePreview: UIKit.UIImage? {
|
|
244
|
+
get
|
|
245
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
246
|
+
set
|
|
247
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
248
|
+
_modify
|
|
249
|
+
}
|
|
250
|
+
final public var $imagePreview: Combine.Published<UIKit.UIImage?>.Publisher {
|
|
251
|
+
get
|
|
252
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
253
|
+
set
|
|
254
|
+
}
|
|
255
|
+
@Combine.Published<Swift.Bool> @_projectedValueProperty($isShowingPhotoPicker) final public var isShowingPhotoPicker: Swift.Bool {
|
|
256
|
+
get
|
|
257
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
258
|
+
set
|
|
259
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
260
|
+
_modify
|
|
261
|
+
}
|
|
262
|
+
final public var $isShowingPhotoPicker: Combine.Published<Swift.Bool>.Publisher {
|
|
263
|
+
get
|
|
264
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
265
|
+
set
|
|
266
|
+
}
|
|
267
|
+
@Combine.Published<FootprintNativeCameraSwift.CameraManager> @_projectedValueProperty($cameraManager) final public var cameraManager: FootprintNativeCameraSwift.CameraManager {
|
|
268
|
+
get
|
|
269
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
270
|
+
set
|
|
271
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
272
|
+
_modify
|
|
273
|
+
}
|
|
274
|
+
final public var $cameraManager: Combine.Published<FootprintNativeCameraSwift.CameraManager>.Publisher {
|
|
275
|
+
get
|
|
276
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
277
|
+
set
|
|
278
|
+
}
|
|
279
|
+
@Combine.Published<AVFoundation.AVCaptureDevice.TorchMode> @_projectedValueProperty($flashMode) final public var flashMode: AVFoundation.AVCaptureDevice.TorchMode {
|
|
280
|
+
get
|
|
281
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
282
|
+
set
|
|
283
|
+
@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
|
|
284
|
+
_modify
|
|
285
|
+
}
|
|
286
|
+
final public var $flashMode: Combine.Published<AVFoundation.AVCaptureDevice.TorchMode>.Publisher {
|
|
287
|
+
get
|
|
288
|
+
@available(iOS 14.0, tvOS 14.0, watchOS 7.0, macOS 11.0, *)
|
|
289
|
+
set
|
|
290
|
+
}
|
|
291
|
+
final public var fromPhotoPicker: Swift.Bool
|
|
292
|
+
final public var cameraLeftOffset: CoreFoundation.CGFloat
|
|
293
|
+
final public var cameraRightOffset: CoreFoundation.CGFloat
|
|
294
|
+
final public var cameraTopOffset: CoreFoundation.CGFloat
|
|
295
|
+
final public var cameraBottomOffset: CoreFoundation.CGFloat
|
|
296
|
+
final public var cameraScreenWidth: CoreFoundation.CGFloat
|
|
297
|
+
final public var cameraScreenHeight: CoreFoundation.CGFloat
|
|
298
|
+
final public var shouldRunAutocapture: Swift.Bool {
|
|
299
|
+
get
|
|
300
|
+
}
|
|
301
|
+
public init(startSide: Swift.String, onError: @escaping (Swift.String, Swift.String) -> Swift.Void, onComplete: @escaping () -> Swift.Void)
|
|
302
|
+
final public func onImageCaptured()
|
|
303
|
+
final public func onProcessing()
|
|
304
|
+
final public func onRetakeImage()
|
|
305
|
+
final public func updateCaptureMode(_ isAuto: Swift.Bool)
|
|
306
|
+
final public func updateAutocaptureStatus(_ status: FootprintNativeCamera.AutoCaptureStatus)
|
|
307
|
+
final public func openPhotoLibrary()
|
|
308
|
+
final public func dismiss()
|
|
309
|
+
final public func toggleFlash()
|
|
310
|
+
final public func capturePhoto()
|
|
311
|
+
final public func processGalleryImage(_ image: UIKit.UIImage)
|
|
312
|
+
final public func processPhoto() async
|
|
313
|
+
public typealias ObjectWillChangePublisher = Combine.ObservableObjectPublisher
|
|
314
|
+
@objc deinit
|
|
315
|
+
}
|
|
316
|
+
@_Concurrency.MainActor @preconcurrency public struct AutoCaptureToggleButton : SwiftUICore.View {
|
|
317
|
+
@_Concurrency.MainActor @preconcurrency public init(isAuto: Swift.Bool, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), language: Swift.String? = nil, onToggle: @escaping (Swift.Bool) -> Swift.Void)
|
|
318
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
319
|
+
get
|
|
320
|
+
}
|
|
321
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift23AutoCaptureToggleButtonV4bodyQrvp", 0) __
|
|
322
|
+
}
|
|
323
|
+
@_Concurrency.MainActor @preconcurrency public struct BoxFrameOverlay : SwiftUICore.View {
|
|
324
|
+
@_Concurrency.MainActor @preconcurrency public init(geometry: SwiftUICore.GeometryProxy, isSelfie: Swift.Bool, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), onOffsetsCalculated: @escaping (CoreFoundation.CGFloat, CoreFoundation.CGFloat, CoreFoundation.CGFloat, CoreFoundation.CGFloat) -> Swift.Void)
|
|
325
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
326
|
+
get
|
|
327
|
+
}
|
|
328
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift15BoxFrameOverlayV4bodyQrvp", 0) __
|
|
329
|
+
}
|
|
330
|
+
@_Concurrency.MainActor @preconcurrency public struct CameraCaptureView : SwiftUICore.View {
|
|
331
|
+
@_Concurrency.MainActor @preconcurrency public init(startSide: Swift.String, documentKind: Swift.String?, appearance: FootprintNativeCamera.CaptureAppearance, language: Swift.String?, onError: @escaping (Swift.String, Swift.String) -> Swift.Void, onComplete: @escaping () -> Swift.Void, onClose: @escaping () -> Swift.Void)
|
|
332
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
333
|
+
get
|
|
334
|
+
}
|
|
335
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift0C11CaptureViewV4bodyQrvp", 0) __
|
|
336
|
+
}
|
|
337
|
+
public enum CaptureButtonVariant {
|
|
338
|
+
case primary
|
|
339
|
+
case secondary
|
|
340
|
+
public static func == (a: FootprintNativeCameraSwift.CaptureButtonVariant, b: FootprintNativeCameraSwift.CaptureButtonVariant) -> Swift.Bool
|
|
341
|
+
public func hash(into hasher: inout Swift.Hasher)
|
|
342
|
+
public var hashValue: Swift.Int {
|
|
343
|
+
get
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
@_Concurrency.MainActor @preconcurrency public struct CaptureButton<Content> : SwiftUICore.View where Content : SwiftUICore.View {
|
|
347
|
+
@_Concurrency.MainActor @preconcurrency public init(onClick: @escaping () -> Swift.Void, isLoading: Swift.Bool = false, enabled: Swift.Bool = true, variant: FootprintNativeCameraSwift.CaptureButtonVariant = .primary, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), @SwiftUICore.ViewBuilder content: () -> Content)
|
|
348
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
349
|
+
get
|
|
350
|
+
}
|
|
351
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift13CaptureButtonV4bodyQrvp", 0) __<Content>
|
|
352
|
+
}
|
|
353
|
+
@_Concurrency.MainActor @preconcurrency public struct CapturePreviewOverlay : SwiftUICore.View {
|
|
354
|
+
@_Concurrency.MainActor @preconcurrency public init(capturedImage: UIKit.UIImage, documentSide: Swift.String, onUseImage: @escaping () -> Swift.Void, onRetakePhoto: @escaping () -> Swift.Void, orientation: SwiftUICore.Binding<UIKit.UIInterfaceOrientation>, trayHeight: CoreFoundation.CGFloat, trayWidth: CoreFoundation.CGFloat, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), language: Swift.String? = nil)
|
|
355
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
356
|
+
get
|
|
357
|
+
}
|
|
358
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift21CapturePreviewOverlayV4bodyQrvp", 0) __
|
|
359
|
+
}
|
|
360
|
+
@_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)
|
|
362
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
363
|
+
get
|
|
364
|
+
}
|
|
365
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift13CountdownViewV4bodyQrvp", 0) __
|
|
366
|
+
}
|
|
367
|
+
public struct CaptureErrorHint {
|
|
368
|
+
public let title: Swift.String
|
|
369
|
+
public let message: Swift.String
|
|
370
|
+
public init(title: Swift.String, message: Swift.String)
|
|
371
|
+
}
|
|
372
|
+
@_Concurrency.MainActor @preconcurrency public struct ErrorOverlay : SwiftUICore.View {
|
|
373
|
+
@_Concurrency.MainActor @preconcurrency public init(errorHints: [FootprintNativeCameraSwift.CaptureErrorHint], documentSide: Swift.String, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), language: Swift.String? = nil, onTryAgain: @escaping () -> Swift.Void)
|
|
374
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
375
|
+
get
|
|
376
|
+
}
|
|
377
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift12ErrorOverlayV4bodyQrvp", 0) __
|
|
378
|
+
}
|
|
379
|
+
@_Concurrency.MainActor @preconcurrency public struct FeedbackChipView : SwiftUICore.View {
|
|
380
|
+
@_Concurrency.MainActor @preconcurrency public init(text: Swift.String, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens())
|
|
381
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
382
|
+
get
|
|
383
|
+
}
|
|
384
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift16FeedbackChipViewV4bodyQrvp", 0) __
|
|
385
|
+
}
|
|
386
|
+
@_Concurrency.MainActor @preconcurrency public struct NextStepOverlay : SwiftUICore.View {
|
|
387
|
+
@_Concurrency.MainActor @preconcurrency public init(documentSide: Swift.String, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), language: Swift.String? = nil)
|
|
388
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
389
|
+
get
|
|
390
|
+
}
|
|
391
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift15NextStepOverlayV4bodyQrvp", 0) __
|
|
392
|
+
}
|
|
393
|
+
@_Concurrency.MainActor @preconcurrency public struct PhotoPicker : SwiftUI.UIViewControllerRepresentable {
|
|
394
|
+
@_Concurrency.MainActor @preconcurrency public init(onImageSelected: @escaping (UIKit.UIImage) -> Swift.Void, onError: @escaping (FootprintNativeCameraSwift.CameraError) -> Swift.Void, onProcessing: @escaping () -> Swift.Void)
|
|
395
|
+
@_Concurrency.MainActor @preconcurrency public func makeUIViewController(context: FootprintNativeCameraSwift.PhotoPicker.Context) -> PhotosUI.PHPickerViewController
|
|
396
|
+
@_Concurrency.MainActor @preconcurrency public func updateUIViewController(_ uiViewController: PhotosUI.PHPickerViewController, context: FootprintNativeCameraSwift.PhotoPicker.Context)
|
|
397
|
+
@_Concurrency.MainActor @preconcurrency public func makeCoordinator() -> FootprintNativeCameraSwift.PhotoPicker.Coordinator
|
|
398
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency public class Coordinator : ObjectiveC.NSObject, PhotosUI.PHPickerViewControllerDelegate {
|
|
399
|
+
@_Concurrency.MainActor @preconcurrency public func picker(_ picker: PhotosUI.PHPickerViewController, didFinishPicking results: [PhotosUI.PHPickerResult])
|
|
400
|
+
@objc deinit
|
|
401
|
+
}
|
|
402
|
+
public typealias Body = Swift.Never
|
|
403
|
+
public typealias UIViewControllerType = PhotosUI.PHPickerViewController
|
|
404
|
+
}
|
|
405
|
+
@_Concurrency.MainActor @preconcurrency public struct ProcessingOverlay : SwiftUICore.View {
|
|
406
|
+
@_Concurrency.MainActor @preconcurrency public init(title: Swift.String, subtitle: Swift.String, documentSide: Swift.String, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens())
|
|
407
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
408
|
+
get
|
|
409
|
+
}
|
|
410
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift17ProcessingOverlayV4bodyQrvp", 0) __
|
|
411
|
+
}
|
|
412
|
+
@_Concurrency.MainActor @preconcurrency public struct SubmittingOverlay : SwiftUICore.View {
|
|
413
|
+
@_Concurrency.MainActor @preconcurrency public init(documentSide: Swift.String, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), language: Swift.String? = nil)
|
|
414
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
415
|
+
get
|
|
416
|
+
}
|
|
417
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift17SubmittingOverlayV4bodyQrvp", 0) __
|
|
418
|
+
}
|
|
419
|
+
@_Concurrency.MainActor @preconcurrency public struct SuccessOverlay : SwiftUICore.View {
|
|
420
|
+
@_Concurrency.MainActor @preconcurrency public init(documentSide: Swift.String, tokens: FootprintNativeCameraSwift.CaptureTokens = CaptureTokens(), language: Swift.String? = nil)
|
|
421
|
+
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
|
|
422
|
+
get
|
|
423
|
+
}
|
|
424
|
+
public typealias Body = @_opaqueReturnTypeOf("$s26FootprintNativeCameraSwift14SuccessOverlayV4bodyQrvp", 0) __
|
|
425
|
+
}
|
|
426
|
+
extension FootprintNativeCameraSwift.CameraPreview : Swift.Sendable {}
|
|
427
|
+
extension FootprintNativeCameraSwift.AutoCaptureToggleButton : Swift.Sendable {}
|
|
428
|
+
extension FootprintNativeCameraSwift.BoxFrameOverlay : Swift.Sendable {}
|
|
429
|
+
extension FootprintNativeCameraSwift.CameraCaptureView : Swift.Sendable {}
|
|
430
|
+
extension FootprintNativeCameraSwift.CaptureButtonVariant : Swift.Equatable {}
|
|
431
|
+
extension FootprintNativeCameraSwift.CaptureButtonVariant : Swift.Hashable {}
|
|
432
|
+
extension FootprintNativeCameraSwift.CaptureButton : Swift.Sendable {}
|
|
433
|
+
extension FootprintNativeCameraSwift.CapturePreviewOverlay : Swift.Sendable {}
|
|
434
|
+
extension FootprintNativeCameraSwift.CountdownView : Swift.Sendable {}
|
|
435
|
+
extension FootprintNativeCameraSwift.ErrorOverlay : Swift.Sendable {}
|
|
436
|
+
extension FootprintNativeCameraSwift.FeedbackChipView : Swift.Sendable {}
|
|
437
|
+
extension FootprintNativeCameraSwift.NextStepOverlay : Swift.Sendable {}
|
|
438
|
+
extension FootprintNativeCameraSwift.PhotoPicker : Swift.Sendable {}
|
|
439
|
+
extension FootprintNativeCameraSwift.PhotoPicker.Coordinator : Swift.Sendable {}
|
|
440
|
+
extension FootprintNativeCameraSwift.ProcessingOverlay : Swift.Sendable {}
|
|
441
|
+
extension FootprintNativeCameraSwift.SubmittingOverlay : Swift.Sendable {}
|
|
442
|
+
extension FootprintNativeCameraSwift.SuccessOverlay : Swift.Sendable {}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Info.plist</key>
|
|
8
|
+
<data>
|
|
9
|
+
e+6I2QVj1oQDl5Y8dQFzGFz2Iso=
|
|
10
|
+
</data>
|
|
11
|
+
</dict>
|
|
12
|
+
<key>files2</key>
|
|
13
|
+
<dict/>
|
|
14
|
+
<key>rules</key>
|
|
15
|
+
<dict>
|
|
16
|
+
<key>^.*</key>
|
|
17
|
+
<true/>
|
|
18
|
+
<key>^.*\.lproj/</key>
|
|
19
|
+
<dict>
|
|
20
|
+
<key>optional</key>
|
|
21
|
+
<true/>
|
|
22
|
+
<key>weight</key>
|
|
23
|
+
<real>1000</real>
|
|
24
|
+
</dict>
|
|
25
|
+
<key>^.*\.lproj/locversion.plist$</key>
|
|
26
|
+
<dict>
|
|
27
|
+
<key>omit</key>
|
|
28
|
+
<true/>
|
|
29
|
+
<key>weight</key>
|
|
30
|
+
<real>1100</real>
|
|
31
|
+
</dict>
|
|
32
|
+
<key>^Base\.lproj/</key>
|
|
33
|
+
<dict>
|
|
34
|
+
<key>weight</key>
|
|
35
|
+
<real>1010</real>
|
|
36
|
+
</dict>
|
|
37
|
+
<key>^version.plist$</key>
|
|
38
|
+
<true/>
|
|
39
|
+
</dict>
|
|
40
|
+
<key>rules2</key>
|
|
41
|
+
<dict>
|
|
42
|
+
<key>.*\.dSYM($|/)</key>
|
|
43
|
+
<dict>
|
|
44
|
+
<key>weight</key>
|
|
45
|
+
<real>11</real>
|
|
46
|
+
</dict>
|
|
47
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
48
|
+
<dict>
|
|
49
|
+
<key>omit</key>
|
|
50
|
+
<true/>
|
|
51
|
+
<key>weight</key>
|
|
52
|
+
<real>2000</real>
|
|
53
|
+
</dict>
|
|
54
|
+
<key>^.*</key>
|
|
55
|
+
<true/>
|
|
56
|
+
<key>^.*\.lproj/</key>
|
|
57
|
+
<dict>
|
|
58
|
+
<key>optional</key>
|
|
59
|
+
<true/>
|
|
60
|
+
<key>weight</key>
|
|
61
|
+
<real>1000</real>
|
|
62
|
+
</dict>
|
|
63
|
+
<key>^.*\.lproj/locversion.plist$</key>
|
|
64
|
+
<dict>
|
|
65
|
+
<key>omit</key>
|
|
66
|
+
<true/>
|
|
67
|
+
<key>weight</key>
|
|
68
|
+
<real>1100</real>
|
|
69
|
+
</dict>
|
|
70
|
+
<key>^Base\.lproj/</key>
|
|
71
|
+
<dict>
|
|
72
|
+
<key>weight</key>
|
|
73
|
+
<real>1010</real>
|
|
74
|
+
</dict>
|
|
75
|
+
<key>^Info\.plist$</key>
|
|
76
|
+
<dict>
|
|
77
|
+
<key>omit</key>
|
|
78
|
+
<true/>
|
|
79
|
+
<key>weight</key>
|
|
80
|
+
<real>20</real>
|
|
81
|
+
</dict>
|
|
82
|
+
<key>^PkgInfo$</key>
|
|
83
|
+
<dict>
|
|
84
|
+
<key>omit</key>
|
|
85
|
+
<true/>
|
|
86
|
+
<key>weight</key>
|
|
87
|
+
<real>20</real>
|
|
88
|
+
</dict>
|
|
89
|
+
<key>^embedded\.provisionprofile$</key>
|
|
90
|
+
<dict>
|
|
91
|
+
<key>weight</key>
|
|
92
|
+
<real>20</real>
|
|
93
|
+
</dict>
|
|
94
|
+
<key>^version\.plist$</key>
|
|
95
|
+
<dict>
|
|
96
|
+
<key>weight</key>
|
|
97
|
+
<real>20</real>
|
|
98
|
+
</dict>
|
|
99
|
+
</dict>
|
|
100
|
+
</dict>
|
|
101
|
+
</plist>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'FootprintNativeCameraSwift'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = 'Footprint'
|
|
12
|
+
s.homepage = 'https://onefootprint.com'
|
|
13
|
+
s.platforms = { :ios => '16.0' }
|
|
14
|
+
s.swift_version = '5.9'
|
|
15
|
+
s.source = { git: '' }
|
|
16
|
+
s.static_framework = true
|
|
17
|
+
|
|
18
|
+
# KMP-NativeCoroutines Swift runtime the vendored FootprintNativeCameraSwift
|
|
19
|
+
# framework links against (it bridges the KMM @NativeCoroutines Flows/suspend
|
|
20
|
+
# funcs to Combine/async). The pod build (Expo) resolves 1.0.2 from the git tag
|
|
21
|
+
# the bridge config plugin adds to the app Podfile — 1.0.2 isn't on CocoaPods
|
|
22
|
+
# trunk, and the version must match the gradle @NativeCoroutines plugin that
|
|
23
|
+
# generated the KMM xcframework.
|
|
24
|
+
s.dependency 'KMPNativeCoroutinesAsync', '1.0.2'
|
|
25
|
+
s.dependency 'KMPNativeCoroutinesCombine', '1.0.2'
|
|
26
|
+
|
|
27
|
+
# Prebuilt binaries only — no camera source is shipped to or compiled by the consumer:
|
|
28
|
+
# FootprintNativeCamera — KMM shared logic (`./gradlew :shared:packForXcode`)
|
|
29
|
+
# FootprintNativeCameraSwift — the iOS camera UI/capture layer, compiled from
|
|
30
|
+
# Sources/ by scripts/build-ios-swift-xcframework.sh
|
|
31
|
+
# The camera icons (Assets.xcassets) are embedded in the FootprintNativeCameraSwift
|
|
32
|
+
# framework at build time and loaded via `Bundle.cameraResources`.
|
|
33
|
+
s.vendored_frameworks = [
|
|
34
|
+
'FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework',
|
|
35
|
+
'FootprintNativeCameraSwift/Frameworks/FootprintNativeCameraSwift.xcframework'
|
|
36
|
+
]
|
|
37
|
+
end
|
package/README.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
|
1
|
-
#
|
|
1
|
+
# footprint-native-camera-module
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
KMM module providing the native document capture screen, detection / autocapture, and per-side upload contract. Same source consumed by:
|
|
4
|
+
|
|
5
|
+
- `HandoffSharedLogic` — via SwiftPM (iOS) and a Gradle composite build (Android), for the existing handoff flow.
|
|
6
|
+
- `@onefootprint/footprint-expo-camera-module` — via React Native autolinking (iOS podspec + Android gradle subproject), for the Expo SDK's native document capture.
|
|
7
|
+
|
|
8
|
+
## Public surface (common)
|
|
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
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
pnpm build:native # ./gradlew :shared:assembleRelease + :shared:packForXcode, copies AAR to android/libs/
|
|
46
|
+
pnpm build:android # just the AAR
|
|
47
|
+
pnpm build:ios # just the xcframework
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Outputs:
|
|
51
|
+
- `FootprintNativeCameraSwift/Frameworks/FootprintNativeCamera.xcframework` — Kotlin types
|
|
52
|
+
- `android/libs/footprint-native-camera-module.aar` — Android library
|
|
53
|
+
- Both are gitignored and regenerated from source.
|
|
54
|
+
|
|
55
|
+
## Dev workflow
|
|
56
|
+
|
|
57
|
+
When you change Kotlin or Swift in this module:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
# In this directory:
|
|
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
|
+
```
|
|
68
|
+
|
|
69
|
+
For HandoffSwift / HandoffSharedLogic, no yalc — they consume sources via SwiftPM / composite Gradle build directly.
|
|
70
|
+
|
|
71
|
+
## Publishing to npm
|
|
72
|
+
|
|
73
|
+
Published as `@onefootprint/footprint-native-camera-module` via the `mobile_npm_publish` GitHub
|
|
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`.
|
|
77
|
+
|
|
78
|
+
Publish the **native module before** the Expo bridge — the bridge peer-depends on it.
|