mirror of
https://github.com/tomfong/simple-qr.git
synced 2025-06-28 20:19:59 +00:00
chore: upgrade to capacitor 4
This commit is contained in:
parent
2a60bdff50
commit
88d68e97a1
18 changed files with 461 additions and 436 deletions
|
@ -6,8 +6,8 @@ android {
|
|||
applicationId "com.tomfong.simpleqr"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 2080000
|
||||
versionName "2.8.0"
|
||||
versionCode 3000000
|
||||
versionName "3.0.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
@ -30,6 +30,8 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
||||
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
||||
implementation project(':capacitor-android')
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
android {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,14 +9,13 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
|
||||
<item name="android:background">#00a5aa</item>
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
||||
<item name="android:background">@drawable/splash</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
|
||||
<item name="android:background">#00a5aa</item>
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
||||
<item name="android:background">@drawable/splash</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
|
||||
<item name="android:background">#00a5aa</item>
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
||||
<item name="android:background">@drawable/splash</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
|
||||
<item name="android:background">#00a5aa</item>
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
||||
<item name="android:background">@drawable/splash</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
|
||||
<item name="android:background">#00a5aa</item>
|
||||
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
|
||||
<item name="android:background">@drawable/splash</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -4,11 +4,11 @@ buildscript {
|
|||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath 'com.google.gms:google-services:4.3.5'
|
||||
classpath 'com.android.tools.build:gradle:7.2.1'
|
||||
classpath 'com.google.gms:google-services:4.3.13'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -20,10 +20,11 @@ apply from: "variables.gradle"
|
|||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
ext {
|
||||
minSdkVersion = 23
|
||||
compileSdkVersion = 31
|
||||
targetSdkVersion = 31
|
||||
androidxActivityVersion = '1.2.0'
|
||||
androidxAppCompatVersion = '1.2.0'
|
||||
androidxCoordinatorLayoutVersion = '1.1.0'
|
||||
androidxCoreVersion = '1.3.2'
|
||||
androidxFragmentVersion = '1.3.0'
|
||||
junitVersion = '4.13.1'
|
||||
androidxJunitVersion = '1.1.2'
|
||||
androidxEspressoCoreVersion = '3.3.0'
|
||||
cordovaAndroidVersion = '7.0.0'
|
||||
minSdkVersion = 22
|
||||
compileSdkVersion = 32
|
||||
targetSdkVersion = 32
|
||||
androidxActivityVersion = '1.4.0'
|
||||
androidxAppCompatVersion = '1.4.2'
|
||||
androidxCoordinatorLayoutVersion = '1.2.0'
|
||||
androidxCoreVersion = '1.8.0'
|
||||
androidxFragmentVersion = '1.4.1'
|
||||
junitVersion = '4.13.2'
|
||||
androidxJunitVersion = '1.1.3'
|
||||
androidxEspressoCoreVersion = '3.4.0'
|
||||
cordovaAndroidVersion = '10.1.1'
|
||||
coreSplashScreenVersion = '1.0.0-rc01'
|
||||
androidxWebkitVersion = '1.4.0'
|
||||
}
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
@ -376,7 +376,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
|
@ -394,9 +394,9 @@
|
|||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = G23992CVBU;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 2.8.0;
|
||||
MARKETING_VERSION = 3.0.0;
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.tomfong.simpleqr;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -417,9 +417,9 @@
|
|||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = G23992CVBU;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 2.8.0;
|
||||
MARKETING_VERSION = 3.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.tomfong.simpleqr;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Simple QR";
|
||||
|
|
|
@ -46,15 +46,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
|
||||
}
|
||||
|
||||
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||
super.touchesBegan(touches, with: event)
|
||||
|
||||
let statusBarRect = UIApplication.shared.statusBarFrame
|
||||
guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }
|
||||
|
||||
if statusBarRect.contains(touchPoint) {
|
||||
NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Simple QR uses Camera to scan barcodes</string>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
platform :ios, '12.0'
|
||||
require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
|
||||
|
||||
platform :ios, '13.0'
|
||||
use_frameworks!
|
||||
|
||||
# workaround to avoid Xcode caching of Pods that requires
|
||||
|
@ -29,3 +31,8 @@ target 'App' do
|
|||
capacitor_pods
|
||||
# Add your Pods here
|
||||
end
|
||||
|
||||
|
||||
post_install do |installer|
|
||||
assertDeploymentTarget(installer)
|
||||
end
|
||||
|
|
736
package-lock.json
generated
736
package-lock.json
generated
File diff suppressed because it is too large
Load diff
40
package.json
40
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "simple-qr",
|
||||
"version": "2.8.0",
|
||||
"version": "3.0.0",
|
||||
"author": "Tom Fong",
|
||||
"homepage": "https://tomfong.github.io",
|
||||
"scripts": {
|
||||
|
@ -34,23 +34,23 @@
|
|||
"@awesome-cordova-plugins/sms": "^5.45.0",
|
||||
"@awesome-cordova-plugins/social-sharing": "^5.45.0",
|
||||
"@awesome-cordova-plugins/theme-detection": "^5.45.0",
|
||||
"@capacitor-community/barcode-scanner": "^2.1.1",
|
||||
"@capacitor-community/contacts": "^1.1.3",
|
||||
"@capacitor-community/screen-brightness": "^1.0.1",
|
||||
"@capacitor/android": "^3.8.0",
|
||||
"@capacitor/app": "^1.1.1",
|
||||
"@capacitor/camera": "^1.3.1",
|
||||
"@capacitor/clipboard": "^1.0.8",
|
||||
"@capacitor/core": "^3.8.0",
|
||||
"@capacitor/device": "^1.1.2",
|
||||
"@capacitor/filesystem": "^1.1.0",
|
||||
"@capacitor/haptics": "^1.1.4",
|
||||
"@capacitor/ios": "^3.8.0",
|
||||
"@capacitor/keyboard": "^1.2.3",
|
||||
"@capacitor/splash-screen": "^1.2.2",
|
||||
"@capacitor/status-bar": "^1.0.8",
|
||||
"@capacitor/toast": "^1.0.8",
|
||||
"@ionic/angular": "^6.2.7",
|
||||
"@capacitor-community/barcode-scanner": "^3.0.0",
|
||||
"@capacitor-community/contacts": "^2.0.0-0",
|
||||
"@capacitor-community/screen-brightness": "^2.0.0-0",
|
||||
"@capacitor/android": "^4.3.0",
|
||||
"@capacitor/app": "^4.0.1",
|
||||
"@capacitor/camera": "^4.1.1",
|
||||
"@capacitor/clipboard": "^4.0.1",
|
||||
"@capacitor/core": "^4.3.0",
|
||||
"@capacitor/device": "^4.0.1",
|
||||
"@capacitor/filesystem": "^4.1.1",
|
||||
"@capacitor/haptics": "^4.0.1",
|
||||
"@capacitor/ios": "^4.3.0",
|
||||
"@capacitor/keyboard": "^4.0.1",
|
||||
"@capacitor/splash-screen": "^4.0.1",
|
||||
"@capacitor/status-bar": "^4.0.1",
|
||||
"@capacitor/toast": "^4.0.1",
|
||||
"@ionic/angular": "^6.2.8",
|
||||
"@ionic/storage": "^3.0.6",
|
||||
"@ionic/storage-angular": "^3.0.6",
|
||||
"@ng-bootstrap/ng-bootstrap": "^11.0.1",
|
||||
|
@ -83,7 +83,7 @@
|
|||
"@angular/compiler": "^13.3.5",
|
||||
"@angular/compiler-cli": "^13.3.5",
|
||||
"@angular/language-service": "^13.3.11",
|
||||
"@capacitor/cli": "^3.8.0",
|
||||
"@capacitor/cli": "^4.3.0",
|
||||
"@ionic/angular-toolkit": "^6.1.0",
|
||||
"@types/jasmine": "^3.10.6",
|
||||
"@types/jasminewd2": "^2.0.10",
|
||||
|
@ -92,7 +92,7 @@
|
|||
"codelyzer": "^6.0.2",
|
||||
"jasmine-core": "~3.8.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "^6.4.0",
|
||||
"karma": "^6.4.1",
|
||||
"karma-chrome-launcher": "^3.1.1",
|
||||
"karma-coverage": "~2.0.3",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
import { SplashScreen } from '@capacitor/splash-screen';
|
||||
import { Toast } from '@capacitor/toast';
|
||||
import { AlertController, Platform } from '@ionic/angular';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
@ -59,10 +60,11 @@ export class TabsPage {
|
|||
}
|
||||
|
||||
async ionViewDidEnter() {
|
||||
await SplashScreen.hide()
|
||||
if (this.env.firstAppLoad) {
|
||||
this.env.firstAppLoad = false;
|
||||
await this.loadPatchNote();
|
||||
await this.router.navigate([this.env.startPage], { replaceUrl: true });
|
||||
await this.loadPatchNote();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export declare type LanguageType = 'de' | 'en' | 'fr' | 'it' | 'zh-CN' | 'zh-HK'
|
|||
})
|
||||
export class EnvService {
|
||||
|
||||
public appVersionNumber: string = '2.8.0';
|
||||
public appVersionNumber: string = '3.0.0';
|
||||
|
||||
public startPage: "/tabs/scan" | "/tabs/generate" | "/tabs/import-image" | "/tabs/history" | "/tabs/setting" = "/tabs/scan";
|
||||
public historyPageStartSegment: 'history' | 'bookmarks' = 'history';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue