Skip to content

Instantly share code, notes, and snippets.

Created October 8, 2014 21:05
What would you like to do?
Dump the Swift-synthesized headers for a module
#! /bin/sh
# usage: <shellscript> [--osx] typename
if [ "$1" = "--osx" ] ; then
echo ":print_module $2" | xcrun swift -deprecated-integrated-repl
sdk_path=$(echo `xcrun --show-sdk-path` | sed 's#MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk#iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk#')
echo ":print_module $1" | xcrun swift -deprecated-integrated-repl -sdk "$sdk_path"
Copy link

I just learned from that :type lookup Foo works in the non-deprecated REPL (just regular swift)!

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