UAWhitelist Class Reference
Inherits from | NSObject |
Declared in | UAWhitelist.h |
Overview
Class for whitelisting and verifying webview URLs.
Whitelist entries are written as URL patterns with optional wildcard matching:
<scheme> := ‘*’ | ‘http’ | ‘https’
<host> := ‘*’ | ‘*.’<any char except ‘/’ and ‘*’> | <any char except ‘/’ and ‘*’>
<path> := ‘/’ <any chars, including *>
<pattern> := ‘*’ | <scheme>://<host><path> | <scheme>://<host> | file://<path>
Wildcards in the scheme pattern will match either http or https schemes. The wildcard in a host pattern “*.mydomain.com” will match anything within the mydomain.com domain. Wildcards in the path pattern will match any characters, including subdirectories.
Note that NSURL does not support internationalized domains containing non-ASCII characters. All whitelist entries for internationalized domains must be in ASCII IDNA format as specified in https://tools.ietf.org/html/rfc3490
Class Methods
whitelistWithConfig:
Create a default whitelist with entries specified in a config object.
+ (instancetype)whitelistWithConfig:(UAConfig *)config
Parameters
- config
An instance of UAConfig.
Return Value
An instance of UAWhitelist
Discussion
Note: The entry “*.urbanairship.com” is added by default.
Declared In
UAWhitelist.h