My app shall open a rather long URL using system.openURL(). There are no problems whatsoever on Android, but on iOS it fails.
I have tried to shorten the URL, then its OK. How can I solve this? The URL in question is e.g.
https://kart.gulesider.no/?c=59.941428,11.031561&z=14&d={%22m%22:[[59.941686,11.02169,null,0],[59.944609,11.048555,null,0]]}
It opens OK directly in Safari, but not from the app. Any help highly appreciated.
Found the solution myself. An URL containing special characters like { [] } is not accepted by Safari (when parsed from Corona). These special characters must be replaced by
{ - %7B
[ - %5B
] - %5D
} - %7D
For other characters please refer to https://www.w3schools.com/tags/ref_urlencode.ASP , URL Encoding Functions.
Android is satisfied with both formats, so no need to make separat URL’s depending on target OS.
pixec
January 25, 2020, 9:24pm
3
Why not use base64 for urls?