Skip to content

Instantly share code, notes, and snippets.

@jasonbekolay
jasonbekolay / trigger webViewWebContentProcessDidTerminate in simulator
Last active April 25, 2024 10:24
Killing a WKWebView content process in the iOS simulator to trigger a webViewWebContentProcessDidTerminate call
# In the command line, find the PID of your simulator process:
ps -p `pgrep launchd_sim`
# or if you have many simulators running:
ps -A | grep launchd_sim
# Find the PID of the WebContent process:
pgrep -P <simulator-pid> 'com.apple.WebKit.WebContent'
# kill it
@henrik
henrik / ocr.markdown
Created March 3, 2012 17:07
OCR on OS X with tesseract

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

@hramos
hramos / buildandarchive.sh
Created January 11, 2011 04:25
Build and Archive script from command line. Use with testflight deployment script, or upload .ipa to web server (use iOS Beta Builder to create initial manifest files)
MY_USERNAME="username"
CONFIGURATION_NAME="Ad Hoc" # Distribution, Ad Hoc...
PROJDIR="/path-to-your-xcode-project"
APPLICATION_NAME="myapplication"
PROJECT_NAME="${APPLICATION_NAME}" # .xcodeproj ommitted
TARGET_SDK="iphoneos4.2" # current sdk
PROJECT_BUILDDIR="/Users/${MY_USERNAME}/path-to-build-dir/${CONFIGURATION_NAME}-iphoneos"
TARGET_TEST_NAME="${APPLICATION_NAME}"
BUILD_HISTORY_DIR="${PROJDIR}/distribution/" # write ${APPLICATION_NAME}.IPA here
DEVELOPER_NAME="Your Name (Bundle Prefix If Applicable)" # mine was company name