cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <mmo...@google.com>
Subject [ios] Feature Request: Adding NSUrlProtocol handling for plugins
Date Fri, 05 Apr 2013 16:16:59 GMT
I've written a plugin to handle a custom url protocol using NSURLProtocol.
 However, I had to modify CDVViewController's shouldStartLoadWithRequest:
in order to actually have the URL navigation progress to that point.

Currently, we allow only a fixed set of schemes (file:, tel:, about: etc),
then use the whitelist to check if the scheme is allowed, and finally
fallback to forwarding everything else to the main native application (in
order to handle tel:, sms: etc).

The problem is that the whitelist is hard coded to support only exactly
http[s] and ftp[s], so no custom schemes are possible.

I suspect this was always been planned, but I now propose actually adding a
config file setting to whitelist url schemes, and plugin.xml should be able
to add to this list.

I'm not sure if there is a comparable need on other platforms, its my
impression this isn't necessary on android.

If there is no objection I'll file JIRA and get this in soon.

-Michal

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message