Skip to content

Commit

Permalink
Updated sample apps
Browse files Browse the repository at this point in the history
  • Loading branch information
stsuprenko committed Oct 26, 2023
1 parent f6966a4 commit 3f77195
Show file tree
Hide file tree
Showing 40 changed files with 231 additions and 82 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
//

import UIKit
import MiSnapLicenseManager
import MiSnapCore

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MiSnapLicenseManager.shared().setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared().description)
MiSnapLicenseManager.shared.setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared.description)

/**
By default, this app functions in `offline` mode (a transaction isn't send to a back end from processing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ extension ViewController {

@discardableResult private func licenseValid(_ status: MiSnapLicenseStatus) -> Bool {
if status != .valid && status != .expired {
switch MiSnapLicenseManager.shared().status {
switch MiSnapLicenseManager.shared.status {
case .none: presentAlert(withTitle: "License key is none", message: nil)
case .notValid: presentAlert(withTitle: "License key is not valid", message: nil)
case .disabled: presentAlert(withTitle: "License key is disabled", message: nil)
Expand All @@ -560,11 +560,11 @@ extension ViewController {
return false
}

if !MiSnapLicenseManager.shared().featureSupported(.voice) {
if !MiSnapLicenseManager.shared.featureSupported(.voice) {
presentAlert(withTitle: "Voice capture is not licensed", message: nil)
return false
}
if !MiSnapLicenseManager.shared().featureSupported(.face) {
if !MiSnapLicenseManager.shared.featureSupported(.face) {
presentAlert(withTitle: "Face capture is not licensed", message: nil)
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -416,7 +416,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -443,7 +443,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -474,7 +474,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//

import UIKit
import MiSnapLicenseManager
import MiSnapCore

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MiSnapLicenseManager.shared().setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared().description)
MiSnapLicenseManager.shared.setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared.description)
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//

import UIKit
import MiSnapUX
import MiSnapCore
import MiSnap
import MiSnapLicenseManager
import MiSnapUX

private enum ResultSection: String, Equatable, CaseIterable {
case summary = "Summary"
Expand Down Expand Up @@ -282,7 +282,7 @@ extension ResultViewController {
private func configureOdcSection() {
guard let result = result else { return }

if !MiSnapLicenseManager.shared().featureSupported(.ODC) {
if !MiSnapLicenseManager.shared.featureSupported(.ODC) {
addInfo(withTitle: "Your license doesn't support On-Device Classification", value: "", split: 1000.0)
return
}
Expand All @@ -291,7 +291,7 @@ extension ResultViewController {
}

private func configureOdeSection() {
if !MiSnapLicenseManager.shared().featureSupported(.ODE) {
if !MiSnapLicenseManager.shared.featureSupported(.ODE) {
addInfo(withTitle: "Your license doesn't support On-Device Extraction", value: "", split: 1000.0)
return
}
Expand Down Expand Up @@ -404,7 +404,7 @@ extension ResultViewController {
localizedStatus = "Good"
}
str = "Status: \(localizedStatus)"
if let mibiDataString = result.mibiDataString {
if let mibiDataString = result.mibi.string {
str += "\n\nMIBI: \(mibiDataString)"
}
if let extraction = result.extraction, let barcodeString = extraction.barcodeString {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//

import UIKit
import MiSnapCore
import MiSnap
import MiSnapUX
import MiSnapLicenseManager

class ViewController: UIViewController {
private var misnapVC: MiSnapViewController?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -418,7 +418,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -445,7 +445,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -476,7 +476,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//

import UIKit
import MiSnapLicenseManager
import MiSnapCore

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MiSnapLicenseManager.shared().setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared().description)
MiSnapLicenseManager.shared.setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared.description)
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//

import UIKit
import MiSnapUX
import MiSnapCore
import MiSnap
import MiSnapLicenseManager
import MiSnapUX

private enum ResultSection: String, Equatable, CaseIterable {
case summary = "Summary"
Expand Down Expand Up @@ -282,7 +282,7 @@ extension ResultViewController {
private func configureOdcSection() {
guard let result = result else { return }

if !MiSnapLicenseManager.shared().featureSupported(.ODC) {
if !MiSnapLicenseManager.shared.featureSupported(.ODC) {
addInfo(withTitle: "Your license doesn't support On-Device Classification", value: "", split: 1000.0)
return
}
Expand All @@ -291,7 +291,7 @@ extension ResultViewController {
}

private func configureOdeSection() {
if !MiSnapLicenseManager.shared().featureSupported(.ODE) {
if !MiSnapLicenseManager.shared.featureSupported(.ODE) {
addInfo(withTitle: "Your license doesn't support On-Device Extraction", value: "", split: 1000.0)
return
}
Expand Down Expand Up @@ -404,7 +404,7 @@ extension ResultViewController {
localizedStatus = "Good"
}
str = "Status: \(localizedStatus)"
if let mibiDataString = result.mibiDataString {
if let mibiDataString = result.mibi.string {
str += "\n\nMIBI: \(mibiDataString)"
}
if let extraction = result.extraction, let barcodeString = extraction.barcodeString {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//

import UIKit
import MiSnapCore
import MiSnap
import MiSnapUX
import MiSnapLicenseManager

class ViewController: UIViewController {
private var misnapVC: MiSnapViewController?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -390,7 +390,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -417,7 +417,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -448,7 +448,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//

import UIKit
import MiSnapLicenseManager
import MiSnapCore

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MiSnapLicenseManager.shared().setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared().description)
MiSnapLicenseManager.shared.setLicenseKey("your_license_key_here")
print(MiSnapLicenseManager.shared.description)
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ extension ResultViewController {
mibiTextView.bounces = false
mibiTextView.showsVerticalScrollIndicator = false
mibiTextView.showsHorizontalScrollIndicator = false
mibiTextView.text = result.mibiDataString
mibiTextView.text = result.mibi.string
mibiTextView.font = .systemFont(ofSize: 16)
mibiTextView.textContainer.lineBreakMode = .byCharWrapping

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
//

import UIKit
import MiSnapFacialCaptureUX
import MiSnapCore
import MiSnapFacialCapture
import MiSnapLicenseManager
import MiSnapFacialCaptureUX

class ViewController: UIViewController {
private var misnapFacialCaptureVC: MiSnapFacialCaptureViewController?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -406,7 +406,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand All @@ -433,7 +433,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -464,7 +464,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down

0 comments on commit 3f77195

Please sign in to comment.