When I call Calendar.createEventAsync with url in details object, the url is encoded when I open created calendar event in iOS.
So if I call:
await Calendar.createEventAsync(calendarId, { …, url: ‘Expo’})
URL in calendar event is:
http%3A%2F%2Fwww.expo.io%2Ftest
and you obviously can’t open it by clicking.
How should the URL be formatted so that is shown correctly in iOS Calendar?
I think the only sensible thing for this code to do is expect a validly formatted URL that it passes to the URLWithString method. If the string turns out not to be a valid URL then the result will be nil and perhaps the createEventAsync call can return a promise that resolves to an error to indicate that.
Otherwise if createEventAsync wants to do the escaping it would probably have to accept the parts of the URL and escape them as appropriate before constructing the full URL. e.g. (but of course irrelevant parts could be left out):