Skip to content

Commit

Permalink
Update demos for version 4.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
The Grizzly Labs committed Nov 15, 2023
1 parent 2ad3b06 commit 007143c
Show file tree
Hide file tree
Showing 26 changed files with 82 additions and 87 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.1.2'
// Patch until apkscale is fixed: https://github.com/twilio/apkscale/issues/10
classpath "com.twilio:apkscale:0.0.100"
classpath "androidx.benchmark:benchmark-gradle-plugin:1.1.1"
classpath "com.twilio:apkscale:0.0.101"
classpath "androidx.benchmark:benchmark-gradle-plugin:1.2.0"
classpath "firebase.test.lab:plugin:2.6.2"
}
}
Expand Down
13 changes: 9 additions & 4 deletions android/demo-custom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'com.geniusscansdk.demo'
compileSdk rootProject.ext.compileSdkVersion
ndkVersion rootProject.ext.ndkVersion

defaultConfig {
Expand All @@ -11,6 +12,10 @@ android {
versionName "1.0"
}

buildFeatures {
buildConfig true
}

buildTypes {
release {
minifyEnabled true
Expand All @@ -19,10 +24,10 @@ android {
}

dependencies {
implementation 'com.geniusscansdk:gssdk-core:4.16.0'
implementation 'com.geniusscansdk:gssdk-ocr:4.16.0'
implementation 'com.geniusscansdk:gssdk-core:4.17.0'
implementation 'com.geniusscansdk:gssdk-ocr:4.17.0'

implementation 'androidx.fragment:fragment:1.6.1'
implementation 'androidx.fragment:fragment:1.6.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
}

Expand Down
4 changes: 1 addition & 3 deletions android/demo-custom/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.geniusscansdk.demo"
>
xmlns:tools="http://schemas.android.com/tools" >

<uses-permission android:name="android.permission.CAMERA" />

Expand Down
14 changes: 9 additions & 5 deletions android/demo-simple/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'com.geniusscansdk.simpledemo'
compileSdk rootProject.ext.compileSdkVersion
ndkVersion rootProject.ext.ndkVersion

defaultConfig {
Expand All @@ -11,19 +12,22 @@ android {
versionName "1.0"
}

buildFeatures {
buildConfig true
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
implementation 'com.geniusscansdk:gssdk-core:4.16.0'
implementation 'com.geniusscansdk:gssdk-ocr:4.16.0'
implementation 'com.geniusscansdk:gssdk-scanflow:4.16.0'
implementation 'com.geniusscansdk:gssdk-core:4.17.0'
implementation 'com.geniusscansdk:gssdk-ocr:4.17.0'
implementation 'com.geniusscansdk:gssdk-scanflow:4.17.0'

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
Expand Down
1 change: 0 additions & 1 deletion android/demo-simple/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.geniusscansdk.simpledemo"
tools:ignore="GoogleAppIndexingWarning"
>

Expand Down
File renamed without changes.
Binary file removed android/gradle/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions android/gradle/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Fri Jun 23 10:17:23 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion cordova-plugin-genius-scan-demo/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<engine name="android" spec="~12.0.0" />
<plugin name="cordova-plugin-file" spec="^6.0.1" />
<plugin name="cordova-plugin-preview-any-file" spec="^0.2.9" />
<plugin name="@thegrizzlylabs/cordova-plugin-genius-scan" spec="@thegrizzlylabs/cordova-plugin-genius-scan@4.16.0">
<plugin name="@thegrizzlylabs/cordova-plugin-genius-scan" spec="@thegrizzlylabs/cordova-plugin-genius-scan@4.17.0">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Access camera for demo" />
</plugin>
</widget>
4 changes: 2 additions & 2 deletions dotnet-maui/SimpleDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="GeniusScanSDK.ScanFlow.Android" Version="4.16.0" />
<PackageReference Include="GeniusScanSDK.ScanFlow.Android" Version="4.17.0" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="GeniusScanSDK.ScanFlow.iOS" Version="4.16.0" />
<PackageReference Include="GeniusScanSDK.ScanFlow.iOS" Version="4.17.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions flutter-plugin-genius-scan-demo/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34

lintOptions {
disable 'InvalidPackage'
Expand All @@ -34,7 +34,7 @@ android {
defaultConfig {
applicationId "com.geniusscansdk.flutter.demo"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 3 additions & 1 deletion flutter-plugin-genius-scan-demo/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
// Not possible to update to gradle 8 until open_file fixes its namespace
// https://github.com/crazecoder/open_file/issues/257
classpath 'com.android.tools.build:gradle:7.4.1'
}
}

Expand Down
2 changes: 1 addition & 1 deletion flutter-plugin-genius-scan-demo/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx2048M
android.enableR8=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
40 changes: 20 additions & 20 deletions flutter-plugin-genius-scan-demo/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.17.2"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -84,36 +84,28 @@ packages:
name: flutter_genius_scan
url: "https://pub.dartlang.org"
source: hosted
version: "4.16.0"
version: "4.17.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
matcher:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -219,10 +211,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -259,10 +251,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.0"
vector_math:
dependency: transitive
description:
Expand All @@ -271,6 +263,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
win32:
dependency: transitive
description:
Expand All @@ -288,5 +288,5 @@ packages:
source: hosted
version: "0.2.0+1"
sdks:
dart: ">=3.0.0-0 <4.0.0"
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.3.0"
2 changes: 1 addition & 1 deletion flutter-plugin-genius-scan-demo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
open_file: ^3.1.0

flutter_genius_scan:
version: 4.16.0
version: 4.17.0
path_provider: ^2.0.5

dev_dependencies:
Expand Down
16 changes: 6 additions & 10 deletions ios/GSSDKCustomDemo/GSSDKCustomDemo/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
do {
try GSK.initWithLicenseKey("<YOUR LICENSE KEY - MAKE SURE TO CHANGE YOUR BUNDLE ID TO MATCH THE KEY - WITHOUT LICENSE KEY THE DEMO WILL RUN FOR ONLY 60 SECONDS>")
} catch {
/**
If the SDK is not properly initialized, the SDK method will return errors. This will help you setup the SDK properly. After that, the only reason why this may return an error would be if the license expires.
All the SDK errors return proper errors in that case and you can handle them to ensure you provide a good "degraded" experience. For instance, you can prompt them to update the application to use the scanning
feature.
*/
print("Error while initializing the Genius Scan SDK: \(error)")
}

// Set the SDK license key as early as possible to give it a chance to refresh
// the license key in case it's expired (auto-refresh behavior can also be disabled with
// setLicenseKey(_:autoRefresh:).

// GSK.setLicenseKey("<YOUR LICENSE KEY - MAKE SURE TO CHANGE YOUR BUNDLE ID TO MATCH THE KEY - WITHOUT LICENSE KEY THE DEMO WILL RUN FOR ONLY 60 SECONDS>")

let configuration = GSKCameraSessionConfiguration()

Expand Down
4 changes: 2 additions & 2 deletions ios/GSSDKCustomDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ platform :ios, '11.0'

target 'GSSDKCustomDemo' do

pod 'GSSDK/Core', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.16.0.podspec'
pod 'GSSDK/OCR', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.16.0.podspec'
pod 'GSSDK/Core', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.17.0.podspec'
pod 'GSSDK/OCR', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.17.0.podspec'

end
11 changes: 11 additions & 0 deletions ios/GSSDKSimpleDemo/GSSDKSimpleDemo/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,15 @@ import UIKit
@UIApplicationMain class AppDelegate: NSObject, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {

// Set the SDK license key as early as possible to give it a chance to refresh
// the license key in case it's expired (auto-refresh behavior can also be disabled with
// setLicenseKey(_:autoRefresh:).

// GSK.setLicenseKey("<YOUR LICENSE KEY - MAKE SURE TO CHANGE YOUR BUNDLE ID TO MATCH THE KEY - WITHOUT LICENSE KEY THE DEMO WILL RUN FOR ONLY 60 SECONDS>")

return true
}

}
15 changes: 0 additions & 15 deletions ios/GSSDKSimpleDemo/GSSDKSimpleDemo/Sources/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ import GSSDKScanFlow
final class ViewController: UIViewController, UIDocumentInteractionControllerDelegate {
private var scanner: GSKScanFlow!

override func viewDidLoad() {
super.viewDidLoad()

do {
try GSK.initWithLicenseKey("<YOUR LICENSE KEY - MAKE SURE TO CHANGE YOUR BUNDLE ID TO MATCH THE KEY - WITHOUT LICENSE KEY THE DEMO WILL RUN FOR ONLY 60 SECONDS>")
} catch {
/**
If the SDK is not properly initialized, the SDK method will return errors. This will help you setup the SDK properly. After that, the only reason why this may return an error would be if the license expires.
All the SDK errors return proper errors in that case and you can handle them to ensure you provide a good "degraded" experience. For instance, you can prompt them to update the application to use the scanning
feature.
*/
NSLog("Error while initializing the Genius Scan SDK: \(error)")
}
}

@objc @IBAction func scan(_ sender: UIButton) {
let configuration = baseScannerConfiguration()
configuration.source = .camera
Expand Down
6 changes: 3 additions & 3 deletions ios/GSSDKSimpleDemo/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ platform :ios, '11.0'

target 'GSSDKSimpleDemo' do

pod 'GSSDK/Core', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.16.0.podspec'
pod 'GSSDK/ScanFlow', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.16.0.podspec'
pod 'GSSDK/OCR', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.16.0.podspec'
pod 'GSSDK/Core', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.17.0.podspec'
pod 'GSSDK/ScanFlow', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.17.0.podspec'
pod 'GSSDK/OCR', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-4.17.0.podspec'

end
4 changes: 2 additions & 2 deletions react-native-genius-scan-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ For iOS, run the command `pod install` from the `ios` folder.

Run the app in a simulator or on a phone
```
react-native run-ios
react-native run-android
npx react-native run-ios
npx react-native run-android
```
4 changes: 2 additions & 2 deletions react-native-genius-scan-demo/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
compileSdkVersion = 34
// Cannot target Android API 34 until RN 0.73: https://github.com/facebook/react-native/issues/37769
targetSdkVersion = 33

ndkVersion = "25.1.8937393"
Expand Down
Loading

0 comments on commit 007143c

Please sign in to comment.