Skip to content

Commit

Permalink
Release version 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Team Mobile Schorsch committed Feb 11, 2022
1 parent b5c3ab5 commit 4f08f41
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "GiniBankAPILibrary", url: "https://github.com/gini/bank-api-library-ios.git", .exact("1.0.0")),
.package(name: "GiniBankAPILibrary", url: "https://github.com/gini/bank-api-library-ios.git", .exact("1.1.0")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
34 changes: 33 additions & 1 deletion Sources/GiniCaptureSDK/Core/Helpers/GiniCaptureUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

public func giniCaptureBundle() -> Bundle {
Bundle.module
Bundle.resource
}

/**
Expand Down Expand Up @@ -204,3 +204,35 @@ func measure(block: () -> Void) {
let elaspsedTime = Date().timeIntervalSince(start)
Log(message: "Elapsed time: \(elaspsedTime) seconds", event: "⏲️")
}
private class CaptureSDKBundleFinder {}

extension Foundation.Bundle {

/**
The resource bundle associated with the current module.
- important: When `GiniCaptureSDK` is distributed via Swift Package Manager, it will be synthesized automatically in the name of `Bundle.module`.
*/
static var resource: Bundle = {
let moduleName = "GiniCaptureSDK"
let bundleName = "\(moduleName)_\(moduleName)"

let candidates = [
// Bundle should be present here when the package is linked into an App.
Bundle.main.resourceURL,

// Bundle should be present here when the package is linked into a framework.
Bundle(for: CaptureSDKBundleFinder.self).resourceURL,

// For command-line tools.
Bundle.main.bundleURL,
]

for candidate in candidates {
let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle")
if let bundle = bundlePath.flatMap(Bundle.init(url:)) {
return bundle
}
}
return Bundle(for: GiniCapture.self)
}()
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import AVFoundation
var fileImportToolTipView: ToolTipView?
var qrCodeToolTipView: ToolTipView?
let giniConfiguration: GiniConfiguration
let currentDevice: UIDevice
var currentDevice: UIDevice
fileprivate var detectedQRCodeDocument: GiniQRCodeDocument?
fileprivate var currentQRCodePopup: QRCodeDetectedPopupView?
var shouldShowQRCodeNext = false
Expand All @@ -99,9 +99,9 @@ import AVFoundation

- returns: A view controller instance allowing the user to take a picture or pick a document.
*/
public init(giniConfiguration: GiniConfiguration, currentDevice: UIDevice = .current) {
public init(giniConfiguration: GiniConfiguration) {
self.giniConfiguration = giniConfiguration
self.currentDevice = currentDevice
self.currentDevice = .current
super.init(nibName: nil, bundle: nil)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
// Created by Nadya Karaban on 29.10.21.
//

public let GiniCaptureSDKVersion = "1.2.0"
public let GiniCaptureSDKVersion = "1.3.0"

0 comments on commit 4f08f41

Please sign in to comment.