As per title, what is the maximum length a URL can be, when using a custom URL scheme with an app?
e.g. If I'm launching another app via URL, and passing a blob of data using something like
myappscheme://some/path?data=0123456789ABCDEF
how long can that string get before the URL gets cut off (or the system refuses to launch the other app at all)?
The official documentation specifies a maximum length of 2048 characters for the <loc> element, which is used to submit URLs: URL of the page. This URL must begin with the protocol (e.g. “http”) and end with a trailing slash if required by the web server. This value must not exceed 2,048 characters.
Microsoft Support says "Maximum URL length is 2,083 characters in Internet Explorer".
URL length The REST API supports Uniform Resource Locators (URLs) with a length of up to 6000 characters. To avoid exceeding this limit, it is important to be aware of URL encoding.
Microsoft states that the maximum length of a URL in Internet Explorer is 2,083 characters, with no more than 2,048 characters in the path portion of the URL.
Unfortunately, the answer does not seem to be available. The max len is not defined specifically in any iOS documentation that I could find.
There are limits, as noted above by MSK's link, for the URL base url length, not the absolute string length of the url. So thats probably a safe bet for a max, around 2000 characters.
However, in testing there seemed to be no upper limit. I was able to use 365,535 character URLs on iOS with no problems. But there is no requirement for apple to continue to support it, so it's a "use at your own risk". I would however, say that based on the fact that many, many apps are using this to transfer information, including large amounts of data between apps, that Apple will probably continue to support it, since there seems to be no reason to reduce the length.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With