How would you achieve this? (Struct to URL)

I’ve been working with Swift for a few years, but I’d love your thoughts on how best to achieve the following behavior:

  1. Steve has my app installed on his phone. In the app, he taps a button that calls a function, passing in a specific parameter (let’s say a complex struct of Steve’s personal information) and returning a URL.

  2. Steve sends this URL to Laura, who also has my app installed on her phone. When she opens the URL, my app launches on her phone and calls a function that returns the struct of Steve’s personal information. Now she has his information.

  3. Steve then sends the same URL to Ashley, who does not have my app installed on her phone. When she opens the URL, it instead takes her to the app’s download page on the App Store.

I'm comfortable sending custom filetypes between devices that both have the app installed. What I haven't figured out is how to convert said file to a URL that could be posted to social media and can also redirect non-users to the App Store.

I expect this might require the use of multiple coding languages—if you have specific recommendations, I'd be grateful for patience and detail (as Swift is the only language I know so far). I do own a domain name if needed.


1 Like

This is not really a Swift language or library question, so not really for this forum, but if you're trying to do this on Apple platforms, the functionality exists by combining both of the following features:

Universal Links
Smart App Banners

If you have additional questions, I suggest you follow up on the Apple Developer Forums.