BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

[Closed] Can I share a specific View ?

Forums > SwiftUI

I was trying to save a specific View in SwiftUI, i came across ShareLink, i am however not able to share a specific View in app, like i am able to share a specific page in a web site, is there any way to achieve this , thanks

   

Do you mean deep linking?

   

@Hatsushira - i was looking to share the app on say watsapp etc , but the specific View in the app rather then the app in general , will deep linking work that ? If. that is not possibe, is there any API that i can use before app is launched. that picks up the app address on appstore or that kind of sharing is possible only after app is approved on appstore , thanks ..

   

So, i was able to get this to work, it shows a share sheet - but how can i get some id of the app, which will later show the correct app address on appstore, thanks

ShareLink(item: URL(string: "https://developer.apple.com/xcode/swiftui/")!) {
                        Label("", systemImage: "square.and.arrow.up")
                            .font(.custom("Arial", size: 50))
                    }

   

When you want to deep link to a view in an app the app has already to be installed on the device. Beforehand, this doesn't work.

I'm sure as long as the app is not released Apple's App Store wouldn't show the app to the public, either. Even if you have the link to the app store.

1      

@Thomass - thanks, i am still to go through it but i will soon, as i near completion of a project where i will need this kind of sharing

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.