Legolas Wang
Legolas Wang

Reputation: 2569

SwiftUI ShareLink sheet does not have save to album option

Using SwiftUI's new ShareLink, with a photo. The Share sheet does not have save to album option. Does anyone know how could I get that option, because I need to save an image to the photo library.

As you can see on the screenshot below, it only has add to shared album option.

struct Photo: Transferable {
    static var transferRepresentation: some TransferRepresentation {
        ProxyRepresentation(\.image)
    }

    public var image: Image
    public var caption: String
}

ShareLink(item: photo, preview: SharePreview(photo.caption, image: Image("miniIcon"))) { }

enter image description here

Upvotes: 7

Views: 1178

Answers (1)

Legolas Wang
Legolas Wang

Reputation: 2569

Solved. For whoever encountered this problem. You need to add photo library permission in the Info plist.

Upvotes: 24

Related Questions