Skip to content

Commit

Permalink
Update putImageBytes in swift
Browse files Browse the repository at this point in the history
  • Loading branch information
natsuk4ze committed Aug 19, 2023
1 parent 9727ef3 commit 27e6dcf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/Classes/GalPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public class GalPlugin: NSObject, FlutterPlugin {
) {
writeContent(
assetChangeRequest: {
PHAssetChangeRequest.creationRequestForAsset(from: UIImage(data: bytes)!)
let request = PHAssetCreationRequest.forAsset()
request.addResource(with: .photo, data: bytes, options: nil)
return request
}, album: album, completion: completion
)
}
Expand Down

0 comments on commit 27e6dcf

Please sign in to comment.