IOS app url not found

I created my own app URL for my iOS app. The URL format is similar to this:

myappname://texttobeparsed 

This works fine when I paste the URL into safari, my application opens and handles the URL correctly. The problem is that other applications, such as iMessage or Notes, do not recognize this as a URL.

Why is this URL scheme not recognized as a URL ? Could this be due to the way I installed it in the info.plist file or something else?

Or, should the URL be in a different format for recognition?

I know that you can recognize the system as a URL in applications other than web browsers because I have seen this before with other applications (e.g. iTunes: itms://itunes.com/apps/appname or Twitter: twitter:// or Facebook: fb:// ).

+4
source share
2 answers

There is nothing you can do about it. If the link is not explicit (for example, in HTML email), these applications can simply recognize the built-in set of standard URL schemes. itms:// is one of Apple’s own schemes (for the iTunes Store), so it makes sense that it is supported in addition to the standard schemes mailto:// , http:// , tel:// ...

Edit: I would suggest that the information that is used to determine what constitutes a valid URL in textual representations, etc., is cached in some way. Unlike what I suggested earlier, it seems that application URLs work in Notes, etc. I tested this with tweetbot:// , for example (which I installed), and twitter:// (which I did not install), to make sure that it does not just check a pattern like *:// , but actually uses information about installed applications.

I suggest you reboot the device. If this is a problem with some cache, this may help, and I don’t think much can be done if your URL scheme already works in Safari.

Update: I installed the official Twitter application to check this, the twitter:// scheme was not immediately recognized in Notes, but after killing and restarting the Notes application it worked.

Update 2: I performed a minimal test application with myappname:// as a custom URL scheme. Again, as in the Twitter application, it worked after the Notes application was restarted, so it does not seem to be related to the application’s popularity or has not been sent or not.

+4
source

I can’t answer why it doesn’t work (except that the link interpreter is hardcoded to recognize only certain URL patterns), but I can say that the typical way to do this is to link to a web page and redirect the web pages to your custom layout.

This is a little less elegant because the user will see Safari open for a short time before redirecting your application, but it is also more reliable because the web page can provide a link to the application store to install the application if it is not installed on the user phone.

+1
source

Source: https://habr.com/ru/post/1413332/


All Articles