CRAlpha / CRAlpha/react-native-wkwebview
Consider support deep links other than mailto:// and tel://
- Dominant language
- Objective-C
- Stars
- 637
- Forks
- 263
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
There are some legitimate use cases where opening deep links of various protocols, e.g., `fb://`, `messenger://` should be able to open corresponding apps.
However, [this web view only supports `mailto` and `tel` protocols](https://github.com/CRAlpha/react-native-wkwebview/blob/master/ios/RCTWKWebView/RCTWKWebView.m#L468).
It would be great if all protocols other than `http` and `https` are allowed, and app developers could set [LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSApplicationQueriesSchemes) to meet their needs.
Probably something like:
```
if (![scheme isEqualToString:@"http"] && ![scheme isEqualToString:@"https"]) {
if ([app canOpenURL:url]) {
[app openURL:url];
decisionHandler(WKNavigationActionPolicyCancel);
return;
}
}
```
Seems simple.
If this looks good to you, I can submit a PR.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.