Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
1 answer
62 views

For my app, I have a list of transactions that can be exported as CSV or PDF. For the CSV I use this ShareLink ShareLink(item: exportData()){ Label("Export CSV", systemImage: "list....
Max B's user avatar
  • 400
0 votes
1 answer
153 views

The code is pretty basic, but using a .onTapGesture() doesn't appear to be the way to go. The idea is to track the ShareLink interaction for analytics purposes. ShareLink(item: URL(string: "...
iOS Blacksmith's user avatar
0 votes
0 answers
40 views

I have a SwiftUI app that allows the user to record a movie and passes that to a ShareLink: struct MovieTransferable: Transferable { let url: URL let writeMovie: (URL) -> () ...
Michael O'Brien's user avatar
1 vote
1 answer
309 views

I have a String and an URL containing audio and want to share both via a Sharelink. I have written a Transferable: struct TransferableTextAndAudio: Codable, Transferable { let text: String let ...
Chris's user avatar
  • 1,487
1 vote
0 answers
43 views

Here's how I am using ShareLink: struct ShareableAudioFile: Transferable { let audioUrl: URL @available(iOS 16.0, *) static var transferRepresentation: some TransferRepresentation { ...
xcoder's user avatar
  • 11
0 votes
0 answers
67 views

I want to implement a log exporter to export user logs from pages like Settings or Mail. In UIKit, UIActivityViewController would work well, but I’m looking for a more modern approach using SwiftUI. I ...
Sidney Liu's user avatar
0 votes
2 answers
550 views

I have a problem: I'm trying to open a share sheet from an alert, but the share sheet just does not open. import SwiftUI struct DocumentView: View { // ... @State private var newShare: ...
minomy13's user avatar
  • 130
4 votes
3 answers
2k views

Currently using SwiftUI built in ShareLink functionality. I need to trigger a different action at the same time that ShareLink is pressed. This ShareLink is nested within a SwiftUI Menu. How would I ...
Pete's user avatar
  • 43
3 votes
0 answers
324 views

I'm working with a custom exported type in my macOS app when I found that SwiftUI's ShareLink would not display any options for sharing. Currently, I have a type that conforms to public.data and ...
Oscar Mann's user avatar
0 votes
1 answer
145 views

The goal is to utilize SwiftUI ShareLink to render, and share a specific portion of a SwiftUI View to Messages, Instagram, and other social media applications. My question is, what is the appropriate ...
hallux's user avatar
  • 83
1 vote
1 answer
557 views

Does anyone know how we can share a track(I have the URL, but I will download it, so consider I have the Data the I got from URL session) using ShareLink in Swift, that also has an image attached to ...
Amin's user avatar
  • 327
5 votes
0 answers
418 views

Currently, I’m using a ShareLink to display the standard share sheet in my app. Now, I’d like to display actions inside the share sheet that perform a custom action like the following example. With ...
alexkaessner's user avatar
  • 3,038
0 votes
1 answer
106 views

I'm coding in swiftUI, and I'm trying to create a button that first generates a new image and then opens a ShareSheet where the new image can be shared. However, with the code below, only the ...
Nick's user avatar
  • 59
0 votes
1 answer
381 views

If I run this code in swiftUI in Xcode: ShareLink(item: "Hi", preview: SharePreview("Hi")) I get two apps in the simulator: Messages and Reminders. However, if I run this code to ...
Nick's user avatar
  • 59
2 votes
0 answers
703 views

If you select a file in the Files app on iOS you can tap on the title and get some extra actions, similar to a context menu. I want this in one of my apps and learned about the toolbarTitleMenu ...
Daniel's user avatar
  • 1,126
2 votes
1 answer
690 views

I'm pretty new to Swift and iOS development, and have hit a stumbling block that I should have seen coming... I've implemented a class called Media, which can contain Data or a Url, depending on the ...
Daniel Tuck's user avatar
1 vote
0 answers
62 views

When I try to share a transparent PNG via the Share Sheet and choose "AirDrop" or "Save Image" the saved image is transparent, however when I choose iMessage the image suddenly ...
Warpling's user avatar
  • 2,135
0 votes
1 answer
378 views

I'm trying to present a share sheet with an image. I'd expect the "Save Image" option to be there but it's not. Is there some trick to getting this working?
Warpling's user avatar
  • 2,135
1 vote
1 answer
788 views

I'll try to explain this as simple as possible. I've made an app that modifies an UIImage based on user actions. To be able to share/save the resulting image, I added a ShareLink to my view. Every ...
irrbloss's user avatar
  • 525
8 votes
1 answer
398 views

Using any form of ShareLink with an URL or a String having an URL as text, never is the option Copy-Link offered, even when enabled and showed in the settings ShareLink(item: url)
Peter Lapisu's user avatar
  • 21.1k
3 votes
1 answer
1k views

I want to use ShareLink to save a zipped backup file that needs to be generated in my code. I was able to do this in a clunky way and am looking for something more elegant. My first way had a button ...
Kyra's user avatar
  • 5,477
8 votes
2 answers
2k views

I want to use ShareLink to share a URL that is generated from an API call from an async function. I tried something like this, and it doesn't work: ShareLink (item: Task {await getSharingURL()} ) {...
Ori C.'s user avatar
  • 152
2 votes
0 answers
1k views

My need is to use ShareLink to allow the user to send formatted email or text message including a URL link. My SwiftUI code looks like: ShareLink( item: itemText, subject: Text(&...
Chris Prince's user avatar
  • 7,634
2 votes
1 answer
602 views

I want to share images and text using ShareLink. This is the code for sharing only one image. ShareLink(item: image, preview: SharePreview(vm.post.text, image: image)) { Image(systemName: "...
AppleMango's user avatar
11 votes
1 answer
4k views

Using ShareLink shows a Share button so it opens Share popup when user taps on that button. ShareLink(item: data, subject: Text("Subject"), message: Text("Message")) I would like ...
HarshIT's user avatar
  • 4,935
1 vote
1 answer
1k views

I want to share multiple PDF Documents with apples new ShareLink. I can share a single PDF Document by making my object transferable using the FileReprestation and giving my object into shareLink: ...
printDavid's user avatar
2 votes
0 answers
217 views

I am getting following warning in the console when presenting SwiftUI's ShareLink: [LayoutConstraints] Changing the translatesAutoresizingMaskIntoConstraints property of a UICollectionReusableView ...
Blazej SLEBODA's user avatar
15 votes
4 answers
4k views

I'm using the ShareLink to share an FileDocument which contains a String. The FileDocument is conform to the Transferable protocol. This is the FileDocument Struct: struct TransferableDocument: ...
Patrick's user avatar
  • 373
0 votes
1 answer
2k views

I want to share audio files with the new ShareLink in SwiftUI. I've a Recording entity from Core Data, witch store the URL from the audio file and the file itself is store in the FileManger. I already ...
LucasC's user avatar
  • 53
5 votes
0 answers
609 views

When integrating the new ShareLink into my project, I noticed two unexpected things. First, when I pass a SharePreview to my sharelink with just a title and no image as a pararameter, my AppIcon ...
SwiftUI_Max's user avatar