Skip to content

Instantly share code, notes, and snippets.

Created April 25, 2020 17:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
UIWebView Framework Hunter - Search a directory or repository for frameworks that use UIWebViews, which are deprecated
#!/usr/bin/env bash
set -o pipefail
export LANG=en_US.UTF-8
export location=${PWD}
NC='\033[0m' # No Color
echo "Searching for all frameworks in ${location}":
frameworks=$(find . -name "*.framework*")
for frameworkPath in $frameworks; do
echo "Searching for UIWebView in ${frameworkPath}"
framework=$(echo $frameworkPath | perl -lne '/([a-zA-Z0-9_-]*)(?=\.framework+)/ && print $1')
nm $fullPath | grep "UIWebView"
if [ $? != 0 ]; then
echo -e "${GREEN}PASS: No UIWebView Symbols found in ${framework}${NC}"
echo -e "${RED}FAIL: UIWebView Symbols found in ${framework}${NC}"
Copy link

jspargo commented Apr 26, 2020

Run this script to see which frameworks in your iOS or macOS app are still using UIWebView, which has been deprecated by Apple. To run this script, download it as a zip file by pressing 'Download ZIP' above, and decompress the zip file to get the bash script. Move this script to the top level of your apps directory structure, and run it!
You may need to change the permission first:

  1. chmod +x
  2. ./

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment