@protocol PSPDFApplication <NSObject>
This class handles opening URLs for other applications and coordinates access to the network indicator manager since this is restricted in an iOS extension case.
Returns a Boolean value indicating whether or not the URL’s scheme can be handled by some app installed on the device.
- (BOOL)canOpenURL:(nonnull NSURL *)url;
func canOpen(_ url: URL) -> Bool
The URL to check.
YES if the URL can be opened by an application on the system.
Asks the host to open an URL on the extension’s behalf if we are in an extension context. Else falls back to openURL: or openURL:options:completionHandler (iOS 10)
- (void)openURL:(nonnull NSURL *)url options:(nullable NSDictionary<NSString *, id> *)options completionHandler:(nullable void (^)(BOOL))completionHandler;
func open(_ url: URL, options: [String : Any]? = nil, completionHandler: ((Bool) -> Void)? = nil)
The URL to open
Open options. Ignored unless running in iOS 10 (no extension)
Calls the completion handler. This might call the completion handler even though things did not work (iOS 8/9) because there’s no system concept, or because the handler gets called even if the alert is displayed and the app is not really launched yet. (iOS 10)