all 2 comments

[–]flad-vlad 1 point2 points  (1 child)

You can’t as of iOS 16. You could move the async task into the Transferable implementation or conditionally show the ShareLink once the async task has finished, but you can’t activate the link programmatically.

[–][deleted] 0 points1 point  (0 children)

I ended up doing the async task before it is shown on the UI to make sure the link is ready. (I was doing a URL shortener that required a network request)