diff --git a/.github/workflows/build_dev.yaml b/.github/workflows/build_dev.yaml index 887f9b8..60dd402 100644 --- a/.github/workflows/build_dev.yaml +++ b/.github/workflows/build_dev.yaml @@ -63,13 +63,15 @@ jobs: with: directory: . - - name: Setup Dart - uses: dart-lang/setup-dart@v1 - - - name: Prepare Flutter - uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - directory: "." + flutter-version: "3.44.0" + cache: true + + - name: Get dependencies + run: flutter pub get + shell: bash - name: Validate Flutter uses: emdgroup/mtrust-urp/.github/actions/validate-flutter@main diff --git a/.github/workflows/build_main.yaml b/.github/workflows/build_main.yaml index 046f299..ef26593 100644 --- a/.github/workflows/build_main.yaml +++ b/.github/workflows/build_main.yaml @@ -63,13 +63,15 @@ jobs: with: directory: . - - name: Setup Dart - uses: dart-lang/setup-dart@v1 - - - name: Prepare Flutter - uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - directory: "." + flutter-version: "3.44.0" + cache: true + + - name: Get dependencies + run: flutter pub get + shell: bash - name: Validate Flutter uses: emdgroup/mtrust-urp/.github/actions/validate-flutter@main diff --git a/.github/workflows/pr_dev.yaml b/.github/workflows/pr_dev.yaml index e9f47aa..d8a01df 100644 --- a/.github/workflows/pr_dev.yaml +++ b/.github/workflows/pr_dev.yaml @@ -20,13 +20,17 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Dart - uses: dart-lang/setup-dart@v1 - - - name: Prepare Flutter - uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - directory: example + flutter-version: "3.44.0" + cache: true + + - name: Get dependencies + run: | + flutter pub get + cd example && flutter pub get + shell: bash - name: Run static analysis run: | @@ -48,13 +52,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Dart - uses: dart-lang/setup-dart@v1 - - - name: Prepare Flutter - uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - directory: . + flutter-version: "3.44.0" + cache: true + + - name: Get dependencies + run: flutter pub get + shell: bash - name: Validate Flutter uses: emdgroup/mtrust-urp/.github/actions/validate-flutter@main diff --git a/.github/workflows/pr_main.yaml b/.github/workflows/pr_main.yaml index 72df269..c75e4ac 100644 --- a/.github/workflows/pr_main.yaml +++ b/.github/workflows/pr_main.yaml @@ -20,13 +20,17 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Dart - uses: dart-lang/setup-dart@v1 - - - name: Prepare Flutter - uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - directory: example + flutter-version: "3.44.0" + cache: true + + - name: Get dependencies + run: | + flutter pub get + cd example && flutter pub get + shell: bash - name: Run static analysis run: | @@ -48,13 +52,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Dart - uses: dart-lang/setup-dart@v1 - - - name: Prepare Flutter - uses: emdgroup/mtrust-urp/.github/actions/prepare-flutter@main + - name: Install Flutter + uses: subosito/flutter-action@v2 with: - directory: . + flutter-version: "3.44.0" + cache: true + + - name: Get dependencies + run: flutter pub get + shell: bash - name: Validate Flutter uses: emdgroup/mtrust-urp/.github/actions/validate-flutter@main diff --git a/.gitignore b/.gitignore index 813693d..fb7adaa 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,8 @@ migrate_working_dir/ .dart_tool/ .packages build/ -node_modules/ \ No newline at end of file +node_modules/ + +# Swift Package Manager +.build/ +.swiftpm/ \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 636a781..29dccad 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -3,3 +3,10 @@ include: package:very_good_analysis/analysis_options.5.0.0.yaml analyzer: exclude: - lib/src/pigeon.dart + - build/** + - android/** + - ios/** + - web/** + - windows/** + - macos/** + - linux/** diff --git a/azure_pipeline.yml b/azure_pipeline.yml deleted file mode 100644 index ca1fa5c..0000000 --- a/azure_pipeline.yml +++ /dev/null @@ -1,82 +0,0 @@ -# Xcode -# Build, test, and archive an Xcode workspace on macOS. -# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode - -trigger: - - main - -pool: - vmImage: "ubuntu-latest" - -steps: - # Checkout with persist credentials - - checkout: self - persistCredentials: true - # Install cert for packages - - task: DownloadSecureFile@1 - name: private - inputs: - secureFile: "pipeline_rsa" - - task: DownloadSecureFile@1 - name: public - inputs: - secureFile: "pipeline_rsa.pub" - - - script: | - mkdir ~/.ssh/ - - cp $(private.secureFilePath) ~/.ssh/id_rsa - chmod 400 ~/.ssh/id_rsa - cp $(public.secureFilePath) ~/.ssh/id_rsa.pub - - - script: | - git config --global user.email "pipeline@mtrust.com" - git config --global user.name "Azure Pipeline M-Trust" - - # Install Flutter - - task: FlutterInstall@0 - inputs: - mode: "auto" - channel: "stable" - version: "latest" - # Get packages - - task: FlutterCommand@0 - inputs: - projectDirectory: "." - arguments: "pub get" - - # Build runner - - task: FlutterCommand@0 - inputs: - projectDirectory: "." - arguments: | - pub run pigeon \ - --input pigeons/barcode_kit_pigeon.dart \ - --dart_out lib/src/pigeon.dart \ - --experimental_swift_out ios/Classes/Pigeon.swift \ - --experimental_kotlin_out android/src/main/kotlin/com/emddigital/barcode_kit/pigeon/Pigeon.kt \ - --java_package "com.emddigital.barcode_kit.pigeon" " - # Install NPM - - task: Npm@1 - inputs: - command: "install" - # Run release cmd - - task: Npm@1 - inputs: - command: "custom" - customCommand: "run release" - # Get packages - - task: FlutterCommand@0 - inputs: - projectDirectory: "example" - arguments: "pub get" - - ## Android build and distribute - - task: FlutterBuild@0 - inputs: - target: "apk" - projectDirectory: "example" - arguments: "--release" - # Push tags - - script: 'git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push --follow-tags origin HEAD:$(Build.SourceBranchName)' diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 61b6c4d..5bee4ff 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -7,6 +7,15 @@ # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. +analyzer: + exclude: + - build/** + - android/** + - ios/** + - web/** + - windows/** + - macos/** + - linux/** include: package:flutter_lints/flutter.yaml linter: diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 7c56964..391a902 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -20,7 +20,5 @@ ???? CFBundleVersion 1.0 - MinimumOSVersion - 12.0 diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig index ec97fc6..592ceee 100644 --- a/example/ios/Flutter/Debug.xcconfig +++ b/example/ios/Flutter/Debug.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig index c4855bf..592ceee 100644 --- a/example/ios/Flutter/Release.xcconfig +++ b/example/ios/Flutter/Release.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index d523f41..0000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,101 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '12.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - - - # Start of the permission_handler configuration - target.build_configurations.each do |config| - - # You can enable the permissions needed here. For example to enable camera - # permission, just remove the `#` character in front so it looks like this: - # - # ## dart: PermissionGroup.camera - # 'PERMISSION_CAMERA=1' - # - # Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h - config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ - '$(inherited)', - - ## dart: PermissionGroup.calendar - # 'PERMISSION_EVENTS=1', - - ## dart: PermissionGroup.reminders - # 'PERMISSION_REMINDERS=1', - - ## dart: PermissionGroup.contacts - # 'PERMISSION_CONTACTS=1', - - ## dart: PermissionGroup.camera - 'PERMISSION_CAMERA=1', - - ## dart: PermissionGroup.microphone - 'PERMISSION_MICROPHONE=1', - - ## dart: PermissionGroup.speech - # 'PERMISSION_SPEECH_RECOGNIZER=1', - - ## dart: PermissionGroup.photos - # 'PERMISSION_PHOTOS=1', - - ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse] - # 'PERMISSION_LOCATION=1', - - ## dart: PermissionGroup.notification - # 'PERMISSION_NOTIFICATIONS=1', - - ## dart: PermissionGroup.mediaLibrary - # 'PERMISSION_MEDIA_LIBRARY=1', - - ## dart: PermissionGroup.sensors - # 'PERMISSION_SENSORS=1', - - ## dart: PermissionGroup.bluetooth - # 'PERMISSION_BLUETOOTH=1', - - ## dart: PermissionGroup.appTrackingTransparency - # 'PERMISSION_APP_TRACKING_TRANSPARENCY=1', - - ## dart: PermissionGroup.criticalAlerts - # 'PERMISSION_CRITICAL_ALERTS=1' - ] - - end - # End of the permission_handler configuration - end -end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock deleted file mode 100644 index ab48fa2..0000000 --- a/example/ios/Podfile.lock +++ /dev/null @@ -1,34 +0,0 @@ -PODS: - - Flutter (1.0.0) - - mtrust_barcode_kit (0.0.1): - - Flutter - - native_device_orientation (0.0.1): - - Flutter - - permission_handler_apple (9.3.0): - - Flutter - -DEPENDENCIES: - - Flutter (from `Flutter`) - - mtrust_barcode_kit (from `.symlinks/plugins/mtrust_barcode_kit/ios`) - - native_device_orientation (from `.symlinks/plugins/native_device_orientation/ios`) - - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - mtrust_barcode_kit: - :path: ".symlinks/plugins/mtrust_barcode_kit/ios" - native_device_orientation: - :path: ".symlinks/plugins/native_device_orientation/ios" - permission_handler_apple: - :path: ".symlinks/plugins/permission_handler_apple/ios" - -SPEC CHECKSUMS: - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - mtrust_barcode_kit: 666829c671d5258fe6d9bf7ea5f7a80501d28994 - native_device_orientation: 348b10c346a60ebbc62fb235a4fdb5d1b61a8f55 - permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 - -PODFILE CHECKSUM: af58d951dbef8da019280072eabcbd9dcc50cf6f - -COCOAPODS: 1.16.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 2adc595..0328460 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -10,10 +10,10 @@ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - E87288FC5943E3C48E6481E9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E62CA51F876661F3917C3EFF /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -32,11 +32,10 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 18C0A378C5E28B553D3B81FE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 6FF6BC1CFD3063BC3E87D998 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -45,8 +44,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AB952FDCDF3C26FA9834E8A7 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - E62CA51F876661F3917C3EFF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 784666492D4C4C64000A1A5F /* FlutterFramework */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterFramework; path = Flutter/ephemeral/Packages/.packages/FlutterFramework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -54,34 +52,18 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E87288FC5943E3C48E6481E9 /* Pods_Runner.framework in Frameworks */, + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0CA954CD32B5BB53D663B2A9 /* Pods */ = { - isa = PBXGroup; - children = ( - 6FF6BC1CFD3063BC3E87D998 /* Pods-Runner.debug.xcconfig */, - 18C0A378C5E28B553D3B81FE /* Pods-Runner.release.xcconfig */, - AB952FDCDF3C26FA9834E8A7 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 0D9BB62104A2B4D9C00AD40E /* Frameworks */ = { - isa = PBXGroup; - children = ( - E62CA51F876661F3917C3EFF /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( + 784666492D4C4C64000A1A5F /* FlutterFramework */, + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, @@ -96,8 +78,6 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 0CA954CD32B5BB53D663B2A9 /* Pods */, - 0D9BB62104A2B4D9C00AD40E /* Frameworks */, ); sourceTree = ""; }; @@ -131,21 +111,21 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 3448611280957658ABD37AF1 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 0422542D11D4C950636A01A0 /* [CP] Embed Pods Frameworks */, - 1064C05A1619B506B1125AB5 /* [CP] Copy Pods Resources */, ); buildRules = ( ); dependencies = ( ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -174,6 +154,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -198,62 +181,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0422542D11D4C950636A01A0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1064C05A1619B506B1125AB5 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 3448611280957658ABD37AF1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -360,7 +287,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 = 15.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -438,7 +365,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 = 15.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -487,7 +414,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 = 15.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -567,6 +494,20 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 5e31d3d..5db441f 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata index 21a3cc1..1d526a1 100644 --- a/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift index b636303..c30b367 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/example/ios/Runner/AppDelegate.swift @@ -1,13 +1,16 @@ -import UIKit import Flutter +import UIKit @main -@objc class AppDelegate: FlutterAppDelegate { +@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } + + func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { + GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) + } } diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index d859b61..1be0dbb 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -2,6 +2,8 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName @@ -24,6 +26,31 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + NSCameraUsageDescription + Used for reading barcodes + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneClassName + UIWindowScene + UISceneConfigurationName + flutter + UISceneDelegateClassName + FlutterSceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -43,11 +70,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - - NSCameraUsageDescription - Used for reading barcodes - UIApplicationSupportsIndirectInputEvents - diff --git a/example/lib/main.dart b/example/lib/main.dart index 3dadccf..e36740e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -26,8 +26,7 @@ class _Ui extends BarcodeKitUiBuilder { } @override - Widget buildNoPermission( - BuildContext context, Function() onSettingsRequested) { + Widget buildNoPermission(BuildContext context, Function() onSettingsRequested) { return Stack( children: [ Center( @@ -49,8 +48,7 @@ class _Ui extends BarcodeKitUiBuilder { } @override - Widget buildRequestPermission( - BuildContext context, Function() onPermissionRequested) { + Widget buildRequestPermission(BuildContext context, Function() onPermissionRequested) { return Stack( children: [ Center( @@ -141,19 +139,31 @@ class _BarcodeKitDemoState extends State { widgetAboveMask: Center( child: Text( "Look for the barcode", - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith(color: Colors.white), + style: Theme.of(context).textTheme.headlineMedium!.copyWith(color: Colors.white), ), ), widgetBelowMask: Center( - child: Text( - "Approach barcode with camera 📸", - style: Theme.of(context) - .textTheme - .bodyLarge! - .copyWith(color: Colors.white), + child: Column( + children: [ + Text( + "Approach barcode with camera 📸", + style: Theme.of(context).textTheme.bodyLarge!.copyWith(color: Colors.white), + ), + Expanded( + child: ListView.builder( + itemCount: _texts.length, + itemBuilder: (context, index) { + return Text( + _texts[index], + style: const TextStyle( + color: Colors.white, + ), + textAlign: TextAlign.center, + ); + }, + ), + ), + ], ), ), paused: _paused, @@ -172,8 +182,7 @@ class _BarcodeKitDemoState extends State { child: Row( children: [ ElevatedButton( - child: - _paused ? const Text("Start Scan") : const Text("Pause"), + child: _paused ? const Text("Start Scan") : const Text("Pause"), onPressed: () { setState(() { _paused = !_paused; @@ -183,9 +192,7 @@ class _BarcodeKitDemoState extends State { const Spacer(), Text(_texts.lastOrNull ?? ""), IconButton( - icon: Icon(_rotate - ? Icons.screen_rotation - : Icons.screen_lock_rotation), + icon: Icon(_rotate ? Icons.screen_rotation : Icons.screen_lock_rotation), onPressed: () { setState(() { _rotate = !_rotate; diff --git a/example/pubspec.lock b/example/pubspec.lock index f8acd00..6a7d556 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,98 +5,90 @@ packages: dependency: transitive description: name: archive - sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a" + sha256: a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.0.9" args: dependency: transitive description: name: args - sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.7.0" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.1" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.1" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - crypto: - dependency: transitive - description: - name: crypto - sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "1.19.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.0.9" equatable: dependency: "direct main" description: name: equatable - sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" + sha256: "3bce007a596ff8b3119c45d68aaef631272537c03d30e5d4534dd24bf4c5eaa2" url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.1.0" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" ffi: dependency: transitive description: name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.2.0" flutter: dependency: "direct main" description: flutter @@ -156,34 +148,34 @@ packages: dependency: transitive description: name: image - sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6" + sha256: "6300175e00616bbc832e2fc91bfa4d776af5402c81c7151bee6905bb08473c52" url: "https://pub.dev" source: hosted - version: "4.5.2" + version: "4.9.1" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -196,26 +188,26 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd" url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.20" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.19.0" mtrust_barcode_kit: dependency: "direct main" description: @@ -227,74 +219,74 @@ packages: dependency: transitive description: name: native_device_orientation - sha256: "0c330c068575e4be72cce5968ca479a3f8d5d1e5dfce7d89d5c13a1e943b338c" + sha256: "4751bd8648a1e4a22c2cf3e8035eb0d667f8f6d82f9544b2f7b1bc12de42f0a4" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "2.1.1" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" permission_handler: dependency: transitive description: name: permission_handler - sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849" + sha256: e7317eb2eb611d1bf0386b6b974be9c50449f975f19a90a7b8ea013550302b30 url: "https://pub.dev" source: hosted - version: "11.4.0" + version: "13.0.1" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc + sha256: d7676c6fcf2f0b92537ec41476a6ead45a00b0d8bbb852395a6f9f33f49d6242 url: "https://pub.dev" source: hosted - version: "12.1.0" + version: "14.0.0" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 + sha256: f49cb15a064ea9d974fc7fbb302099353b7b170d07284e86e264561579e5bcf8 url: "https://pub.dev" source: hosted - version: "9.4.7" + version: "9.6.1" permission_handler_html: dependency: transitive description: name: permission_handler_html - sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" + sha256: "6ea98b3f17f60d3b527f2647ed2ab4dc0f6bfe25b22cb1c363f5d8f62252f6ac" url: "https://pub.dev" source: hosted - version: "0.1.3+5" + version: "0.1.4+1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 + sha256: a5c8a97ecf5616112a5b16d4b8e9ec0e5ae90ef63ac69c0d7b8ae240be760b23 url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.4.0" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + sha256: caeae01858a0a7d2df67a445ac98e1ad95e55a0e77c73044f4e9b1c8c2289cbd url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "0.2.2" petitparser: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "7.0.2" plugin_platform_interface: dependency: transitive description: @@ -307,63 +299,63 @@ packages: dependency: transitive description: name: posix - sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a + sha256: bc1bad54ad2b735816e31f8d4600cfde6c7839975085ddfbca48b6c9f7c4044e url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.5.2" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.2" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.12" typed_data: dependency: transitive description: @@ -376,26 +368,26 @@ packages: dependency: transitive description: name: universal_io - sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + sha256: f63cbc48103236abf48e345e07a03ce5757ea86285ed313a6a032596ed9301e2 url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.1" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47 url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.4.2" vm_service: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "0016aef94fc66495ac78af5859181e3f3bf2026bd8eecc72b9565601e19ab360" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "15.2.0" web: dependency: transitive description: @@ -408,10 +400,10 @@ packages: dependency: transitive description: name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + sha256: "67f0aff7be013d107995e9b75bf4e7f2c3ef2dfdb2c8e68024bba0a7fd5756a4" url: "https://pub.dev" source: hosted - version: "6.5.0" + version: "7.0.1" yaml: dependency: transitive description: @@ -421,5 +413,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.11.0 <4.0.0" + flutter: ">=3.44.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index f2f9a44..e7a456a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -7,7 +7,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: sdk: ">=3.3.1 <4.0.0" - flutter: ">=3.3.0" + flutter: ">=3.44.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/generate.sh b/generate.sh index 2e9a97e..0670e8f 100755 --- a/generate.sh +++ b/generate.sh @@ -1,6 +1,6 @@ dart run pigeon \ --input pigeons/barcode_kit_pigeon.dart \ --dart_out lib/src/pigeon.dart \ - --experimental_swift_out ios/Classes/Pigeon.swift \ + --experimental_swift_out ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/Pigeon.swift \ --experimental_kotlin_out android/src/main/kotlin/com/emddigital/mtrust_barcode_kit/pigeon/Pigeon.kt \ - --java_package "com.emddigital.mtrust_barcode_kit.pigeon" \ \ No newline at end of file + --java_package "com.emddigital.mtrust_barcode_kit.pigeon" \ diff --git a/ios/.gitignore b/ios/.gitignore index 0c88507..4657ccb 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -33,6 +33,9 @@ xcuserdata Icon? .tags* +.build/ +.swiftpm/ + /Flutter/Generated.xcconfig /Flutter/ephemeral/ /Flutter/flutter_export_environment.sh \ No newline at end of file diff --git a/ios/Classes/BarcodeKitPlugin.h b/ios/Classes/BarcodeKitPlugin.h deleted file mode 100644 index 163f6a7..0000000 --- a/ios/Classes/BarcodeKitPlugin.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface BarcodeKitPlugin : NSObject -@end diff --git a/ios/Classes/BarcodeKitPlugin.m b/ios/Classes/BarcodeKitPlugin.m deleted file mode 100644 index b0ef5a0..0000000 --- a/ios/Classes/BarcodeKitPlugin.m +++ /dev/null @@ -1,15 +0,0 @@ -#import "BarcodeKitPlugin.h" -#if __has_include() -#import -#else -// Support project import fallback if the generated compatibility header -// is not copied when this plugin is created as a library. -// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 -#import "mtrust_barcode_kit-Swift.h" -#endif - -@implementation BarcodeKitPlugin -+ (void)registerWithRegistrar:(NSObject*)registrar { - [SwiftBarcodeKitPlugin registerWithRegistrar:registrar]; -} -@end diff --git a/ios/mtrust_barcode_kit.podspec b/ios/mtrust_barcode_kit.podspec index 2764616..d07ddfe 100644 --- a/ios/mtrust_barcode_kit.podspec +++ b/ios/mtrust_barcode_kit.podspec @@ -16,9 +16,10 @@ Pod::Spec.new do |s| s.license = { :file => '../LICENSE' } s.author = { 'EMD Group' => 'info@emdgroup.com' } s.source = { :path => '.' } - s.source_files = 'Classes/**/*' + s.source_files = 'mtrust_barcode_kit/Sources/mtrust_barcode_kit/**/*.swift' s.dependency 'Flutter' - s.platform = :ios, '9.0' + s.platform = :ios, '13.0' + s.module_name = 'mtrust_barcode_kit' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } diff --git a/ios/mtrust_barcode_kit/Package.swift b/ios/mtrust_barcode_kit/Package.swift new file mode 100644 index 0000000..4dd8058 --- /dev/null +++ b/ios/mtrust_barcode_kit/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "mtrust_barcode_kit", + platforms: [ + .iOS("13.0"), + ], + products: [ + .library(name: "mtrust-barcode-kit", targets: ["mtrust_barcode_kit"]), + ], + dependencies: [ + .package(name: "FlutterFramework", path: "../FlutterFramework"), + ], + targets: [ + .target( + name: "mtrust_barcode_kit", + dependencies: [ + .product(name: "FlutterFramework", package: "FlutterFramework"), + ], + ), + ], +) diff --git a/ios/Classes/AVMetaDataExtension.swift b/ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/AVMetaDataExtension.swift similarity index 100% rename from ios/Classes/AVMetaDataExtension.swift rename to ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/AVMetaDataExtension.swift diff --git a/ios/Classes/SwiftBarcodeKitPlugin.swift b/ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/BarcodeKitPlugin.swift similarity index 97% rename from ios/Classes/SwiftBarcodeKitPlugin.swift rename to ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/BarcodeKitPlugin.swift index f2064a2..cc5d0d8 100644 --- a/ios/Classes/SwiftBarcodeKitPlugin.swift +++ b/ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/BarcodeKitPlugin.swift @@ -3,7 +3,7 @@ import AVFoundation import UIKit import Vision -public class SwiftBarcodeKitPlugin: NSObject, FlutterPlugin , BarcodeKitHostApi, FlutterTexture, AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureMetadataOutputObjectsDelegate{ +public class BarcodeKitPlugin: NSObject, FlutterPlugin , BarcodeKitHostApi, FlutterTexture, AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureMetadataOutputObjectsDelegate{ public func copyPixelBuffer() -> Unmanaged? { @@ -40,7 +40,7 @@ public class SwiftBarcodeKitPlugin: NSObject, FlutterPlugin , BarcodeKitHostApi, // Setup pigeon public static func register(with registrar: FlutterPluginRegistrar) { let messenger : FlutterBinaryMessenger = registrar.messenger() - BarcodeKitHostApiSetup.setUp(binaryMessenger: messenger, api: SwiftBarcodeKitPlugin(registrar.textures(), registrar: registrar)); + BarcodeKitHostApiSetup.setUp(binaryMessenger: messenger, api: BarcodeKitPlugin(registrar.textures(), registrar: registrar)); } diff --git a/ios/Classes/Pigeon.swift b/ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/Pigeon.swift similarity index 100% rename from ios/Classes/Pigeon.swift rename to ios/mtrust_barcode_kit/Sources/mtrust_barcode_kit/Pigeon.swift diff --git a/lib/src/perspective.dart b/lib/src/perspective.dart index 8b674fe..c677d86 100644 --- a/lib/src/perspective.dart +++ b/lib/src/perspective.dart @@ -138,7 +138,7 @@ class PerspectiveTransform extends Equatable { } // ignore: must_be_immutable -class _PerspectiveMatrix extends ListBase with EquatableMixin { +class _PerspectiveMatrix extends ListBase with Equatable { _PerspectiveMatrix(List> matrix) : _values = matrix.reduce((value, element) => [...value, ...element]); diff --git a/package.json b/package.json index 5edafd7..4a0edf2 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "repository": { "type": "git", - "url": "https://dev.azure.com/M-Trust/Flutter%20Packages/_git/barcode_kit" + "url": "https://github.com/emdgroup/mtrust-barcode-kit" }, "author": "", "license": "ISC", diff --git a/pubspec.yaml b/pubspec.yaml index e3354d0..b1fabdd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,13 +7,13 @@ version: 2.1.0-0 repository: https://github.com/emdgroup/mtrust-barcode-kit environment: sdk: ">=3.3.1 <4.0.0" - flutter: ">=3.3.0" + flutter: ">=3.44.0" dependencies: - equatable: ^2.0.5 + equatable: ^2.1.0 flutter: sdk: flutter - native_device_orientation: ^2.0.3 - permission_handler: ^11.4.0 + native_device_orientation: ^2.1.1 + permission_handler: ^13.0.1 plugin_platform_interface: ^2.1.8 dev_dependencies: flutter_lints: ^5.0.0