30 questions
0 votes
1 answer
64 views
Call ShareUI programmatically [duplicate]
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....
0 votes
1 answer
161 views
How can I detect a ShareLink tap in SwiftUI?
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: "...
0 votes
0 answers
40 views
Is there documentation on requirements for ShareLinking movies to social sites?
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) -> () ...
1 vote
1 answer
318 views
ShareLink with multiple items only shares one at a time
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 ...
1 vote
0 answers
44 views
Sharing audio file with ShareLink sends the file but other apps (except VLC player) can't detect it right
Here's how I am using ShareLink: struct ShareableAudioFile: Transferable { let audioUrl: URL @available(iOS 16.0, *) static var transferRepresentation: some TransferRepresentation { ...
0 votes
0 answers
70 views
Simplest implementation log share button in SwiftUI?
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 ...
0 votes
2 answers
553 views
Why does the ShareLink not open a share sheet? (iOS 17.4)
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: ...
4 votes
3 answers
2k views
How to trigger another action when tapping a ShareLink
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 ...
3 votes
0 answers
330 views
Using a ShareLink with a custom exported type identifier does not display any sharing options
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 ...
0 votes
1 answer
146 views
How can I export a specific portion of a SwiftUI view and retain all styling and layout using ShareLink?
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 ...
1 vote
1 answer
560 views
Sharing an audio using ShareLink
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 ...
5 votes
0 answers
419 views
SwiftUI ShareLink with custom actions
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 ...
0 votes
1 answer
106 views
Cannot generate image which is then shared
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 ...
0 votes
1 answer
384 views
Can't share a png. or jpeg. file to messages app with sharelink
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 ...
2 votes
0 answers
707 views
SwiftUI: Adding a Share Button to Navigation title menu using ShareLink and the toolbarTitleMenu modifier
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 ...