diff --git a/android/build.gradle b/android/build.gradle index b3ee973..843f1f4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 30 + compileSdkVersion 34 sourceSets { main.java.srcDirs += 'src/main/kotlin' diff --git a/ios/Classes/SwiftImageGallerySaverPlugin.swift b/ios/Classes/SwiftImageGallerySaverPlugin.swift index 876c318..afbab76 100644 --- a/ios/Classes/SwiftImageGallerySaverPlugin.swift +++ b/ios/Classes/SwiftImageGallerySaverPlugin.swift @@ -103,6 +103,11 @@ public class SwiftImageGallerySaverPlugin: NSObject, FlutterPlugin { } } } + // PHAuthorizationStatus restricts access to asset + // save the result otherwise this will result in a never ending await at the flutter side + else { + self.saveResult(isSuccess: false, error: self.errorMessage) + } } else { self.saveResult(isSuccess: false, error: self.errorMessage) } @@ -140,6 +145,11 @@ public class SwiftImageGallerySaverPlugin: NSObject, FlutterPlugin { } } } + // PHAuthorizationStatus restricts access to asset + // save the result otherwise this will result in a never ending await at the flutter side + else { + self.saveResult(isSuccess: false, error: self.errorMessage) + } } else { self.saveResult(isSuccess: false, error: self.errorMessage) }