Skip to content

Commit

Permalink
Feature/smilescreens (#236)
Browse files Browse the repository at this point in the history
* feat: optional confirmation on docv

* feat: confirm optional

* modify access for needed utis methos in wrappers

* feat: changelog

* chore: undo signing

* feat: lint warnings

* chore: lint

* chore: lint

* chore: bump version for release

* chore: bump version for release

* chore: bump version for release

* chore: bump version for release
  • Loading branch information
JNdhlovu authored Sep 25, 2024
1 parent 9b3464d commit b41acab
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 127 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Release Notes
## Unreleased
## 10.2.11

### Added
* Add metadata support
* Modified access for util methods for use in wrappers

## 10.2.10

Expand All @@ -20,6 +21,11 @@
### Added
* Document capture cleanup and optionally showing confirmation and returning the captured image if false

## 10.2.9

### Added
* Document capture cleanup and optionally showing confirmation and returning the captured image if false

## 10.2.8

### Changed
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PODS:
- Sentry (8.36.0):
- Sentry/Core (= 8.36.0)
- Sentry/Core (8.36.0)
- SmileID (10.2.10):
- SmileID (10.2.11):
- FingerprintJS
- lottie-ios (~> 4.4.2)
- ZIPFoundation (~> 0.9)
Expand Down Expand Up @@ -51,7 +51,7 @@ SPEC CHECKSUMS:
lottie-ios: fcb5e73e17ba4c983140b7d21095c834b3087418
netfox: 9d5cc727fe7576c4c7688a2504618a156b7d44b7
Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57
SmileID: 41b6c7ea0ec44116c43e94a1221acde297bd3b08
SmileID: 6222ec839420b69917ae23ea11876d78d2529620
SwiftLint: 3fe909719babe5537c552ee8181c0031392be933
ZIPFoundation: b8c29ea7ae353b309bc810586181fd073cb3312c

Expand Down
4 changes: 2 additions & 2 deletions SmileID.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|
s.name = 'SmileID'
s.version = '10.2.10'
s.version = '10.2.11'
s.summary = 'The Official Smile Identity iOS SDK.'
s.homepage = 'https://docs.usesmileid.com/integration-options/mobile/ios-v10-beta'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Japhet' => 'japhet@usesmileid.com', 'Juma Allan' => 'juma@usesmileid.com', 'Vansh Gandhi' => 'vansh@usesmileid.com'}
s.source = { :git => "https://github.com/smileidentity/ios.git", :tag => "v10.2.10" }
s.source = { :git => "https://github.com/smileidentity/ios.git", :tag => "v10.2.11" }
s.ios.deployment_target = '13.0'
s.dependency 'ZIPFoundation', '~> 0.9'
s.dependency 'FingerprintJS'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public struct DocumentCaptureScreen: View {
let onConfirm: (Data) -> Void
let onError: (Error) -> Void
let onSkip: () -> Void

@EnvironmentObject private var localMetadata: LocalMetadata
@ObservedObject private var viewModel: DocumentCaptureViewModel

public init(
side: DocumentCaptureSide,
showInstructions: Bool,
Expand Down Expand Up @@ -55,14 +55,14 @@ public struct DocumentCaptureScreen: View {
self.onConfirm = onConfirm
self.onError = onError
self.onSkip = onSkip

viewModel = DocumentCaptureViewModel(
knownAspectRatio: knownIdAspectRatio,
side: side,
localMetadata: LocalMetadata()
)
}

public var body: some View {
ZStack {
if let captureError = viewModel.captureError {
Expand All @@ -78,7 +78,7 @@ public struct DocumentCaptureScreen: View {
viewModel.updateLocalMetadata(localMetadata)
}
}

private var instructionsView: some View {
DocumentCaptureInstructionsScreen(
heroImage: instructionsHeroImage,
Expand All @@ -95,11 +95,11 @@ public struct DocumentCaptureScreen: View {
ImagePicker(onImageSelected: viewModel.onPhotoSelectedFromGallery)
}
}

private func errorView(error: Error) -> some View {
Color.clear.onAppear { onError(error) }
}

private func confirmationView(imageToConfirm: Data) -> some View {
Group {
if showConfirmation {
Expand All @@ -124,7 +124,7 @@ public struct DocumentCaptureScreen: View {
}
}
}

private var captureView: some View {
CaptureScreenContent(
title: captureTitleText,
Expand All @@ -142,9 +142,7 @@ public struct DocumentCaptureScreen: View {
message: Text(alert.message ?? ""),
primaryButton: .default(
Text(SmileIDResourcesHelper.localizedString(for: "Camera.Unauthorized.PrimaryAction")),
action: {
viewModel.openSettings()
}
action: { viewModel.openSettings() }
),
secondaryButton: .cancel()
)
Expand All @@ -161,7 +159,7 @@ struct CaptureScreenContent: View {
let showManualCaptureButton: Bool
let cameraManager: CameraManager
let onCaptureClick: () -> Void

var body: some View {
VStack(alignment: .center, spacing: 16) {
ZStack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/SmileID/Classes/Helpers/LocalStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class LocalStorage {
try createSmileFile(to: jobId, name: filename(for: FileType.liveness.name), file: data)
}

static func createDocumentFile(
public static func createDocumentFile(
jobId: String,
fileType: FileType,
document data: Data
Expand Down
Loading

0 comments on commit b41acab

Please sign in to comment.