Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to add "https" to iOS info.plist and Android manifest files

I've read the React Native documentation on the canOpenURL method. From what I understood I have to add http:// and https:// to LSApplicationQueriesSchemes and AndroidManifest.xml but it worked fine without me adding those values.

E.g. canOpenURL('https://stackoverflow.com/');

I tried to find iOS and Android specific documentation on that but I couldn't find a clear answer to that.

So do I actually need to add http and https to plist and manifest?

like image 823
Vlad Avatar asked Dec 06 '25 16:12

Vlad


1 Answers

No, you don't need to add those schemes.

LSApplicationQueriesSchemes was added to prevent apps from abusing the system to produce an "app inventory" by stealth. Http and https do not reveal anything. In fact there probably isn't much point in calling canOpenUrl for these schemes as you know that you can (Maybe the user could have removed all browsers from the device, but it seems an unlikely case).

Also, note that canOpenUrl doesn't check anything after the method; It doesn't tell you anything about the validity of the domain name or url path.

like image 70
Paulw11 Avatar answered Dec 08 '25 23:12

Paulw11



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!