I was trying to find a way to quickly detect if there’s real WebView used in an iOS project. I created a script below.
The script will check through both Obj-C and Swift codes.
(
git grep -H -E 'WKWebView\(|SFSafariViewController\(' -- '*.swift' 2>/dev/null
git grep -H -E 'SFSafariViewController alloc|UIWebView alloc' -- '*.m' '*.mm' "*.h' 2>/dev/null
) \
| grep -E '\bWKWebView\(|\bSFSafariViewController\(|\bSFSafariViewController alloc\b|\bUIWebView alloc\b' \
| wc -l
Let me know if you find anything I missed, or a better way of doing it?