From fd3f6c31e5b09faacb7b50ebb76571fef2445adc Mon Sep 17 00:00:00 2001 From: natsuk4ze Date: Thu, 7 Sep 2023 22:11:23 +0900 Subject: [PATCH 1/3] Update to 2.0.0 --- CHANGELOG.md | 7 +++++++ example/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac207c0..59bff056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2.0.0 + +* **ADD: macOS support** #142 +* **BREAKING CHANGE**: `flutter: '>=3.3.0'` to `flutter: '>=3.7.0'` #142 +* **BREAKING CHANGE**: `GalException.error` to `GalException.platformException` #143 +* **BREAKING CHANGE**: Remove `GalExceptionType.notHandle` (had marked deprecated) #144 + ## 1.9.1 * FIX: `album` option is not working on Android API 29 #130 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 9fca9079..df092883 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,6 @@ name: gal_example description: Demonstrates how to use the gal plugin. -version: 1.9.1 +version: 2.0.0 publish_to: none environment: diff --git a/pubspec.yaml b/pubspec.yaml index 5a16cb3e..91d66992 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: gal description: Gal is a Flutter plugin for saving image/video to gallary app. You can also easily handle permissions. -version: 1.9.1 +version: 2.0.0 homepage: https://pub.dev/packages/gal repository: https://github.com/natsuk4ze/gal From 3d33b4c0856a131cdcf28bb01feea9c796356192 Mon Sep 17 00:00:00 2001 From: natsuk4ze Date: Thu, 7 Sep 2023 22:38:47 +0900 Subject: [PATCH 2/3] Update project.pbxproj --- example/macos/Runner.xcodeproj/project.pbxproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj index fb458f00..e13dce4d 100644 --- a/example/macos/Runner.xcodeproj/project.pbxproj +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ isa = PBXAggregateTarget; buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, + 33CC111E2044C6BF0003C045 /* Run Script */, ); dependencies = ( ); @@ -273,7 +273,7 @@ shellPath = /bin/sh; shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { + 33CC111E2044C6BF0003C045 /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -285,6 +285,7 @@ inputPaths = ( Flutter/ephemeral/tripwire, ); + name = "Run Script"; outputFileListPaths = ( Flutter/ephemeral/FlutterOutputs.xcfilelist, ); From 5f9e323e499632b545a3b494c17c64a57b0eb25a Mon Sep 17 00:00:00 2001 From: natsuk4ze Date: Thu, 7 Sep 2023 22:38:58 +0900 Subject: [PATCH 3/3] Remove debugPrint --- darwin/Classes/GalPlugin.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/darwin/Classes/GalPlugin.swift b/darwin/Classes/GalPlugin.swift index 5344dc80..cfaf68d2 100644 --- a/darwin/Classes/GalPlugin.swift +++ b/darwin/Classes/GalPlugin.swift @@ -140,9 +140,6 @@ public class GalPlugin: NSObject, FlutterPlugin { private func hasAccess(toAlbum: Bool) -> Bool { if #available(iOS 14, macOS 11, *) { - print(PHPhotoLibrary.authorizationStatus(for: .addOnly) == .authorized) - print(PHPhotoLibrary.authorizationStatus(for: .readWrite) == .authorized) - print(PHPhotoLibrary.authorizationStatus(for: .readWrite) == .limited) return toAlbum ? PHPhotoLibrary.authorizationStatus(for: .readWrite) == .authorized || PHPhotoLibrary.authorizationStatus(for: .readWrite) == .limited