avioli / uni_links

Flutter plugin for accepting incoming links.
BSD 2-Clause "Simplified" License
563 stars 303 forks source link

How can i do when the user doesn't have the app, the unilink open the app(or play) store into app page #59

Closed lucas-sesti closed 4 years ago

lucas-sesti commented 4 years ago

I'm using unilinks and am testing on my iOS Simulator which is running iOS 13.

When i execute the command: ▶ /usr/bin/xcrun simctl openurl booted "lejour://profile" i got this error: An error was encountered processing the command (domain=NSOSStatusErrorDomain, code=-10814): The operation couldn’t be completed. (OSStatus error -10814.)

I wanna know if have any way to catch this error and redirect to app store or play store in app page

avioli commented 4 years ago

Unfortunately you cannot with custom schemes via openurl. The only way to catch the error is if the app invoking it is another one of yours.

You can use https schemes for this and have a webpage that offers links to the app stores, when the app is not yet installed, while when the app is, the https link will invoke the app.

simplenotezy commented 1 year ago

@avioli can you share some javascript code of how to open the app store when pressing the link, if the app is not installed?

FeelHippo commented 1 year ago

@avioli Hi we are also in the same situation, and some extra documentation/snippets would be greatly appreciated. Thank you!