Skip to content

Instantly share code, notes, and snippets.

@claybridges
Last active August 29, 2015 14:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claybridges/f644b952ee66cc311614 to your computer and use it in GitHub Desktop.
Save claybridges/f644b952ee66cc311614 to your computer and use it in GitHub Desktop.
Xcode 6.4 and Xcode 7 beta 4 both stopped working with OS X El Cap beta 6. This seems to fix it. See comments for deets. Requires a sudo password, don't be freaked out.
#!/usr/bin/env bash
#
# Based on original solution by user lembacon, here:
# https://forums.developer.apple.com/thread/13170?start=105&tstart=0
# Watch fix added by user Richie__.
#
# Created by Clay Bridges, 5 Aug 2015
move_dyld_sim()
{
if [ -f dyld_sim ];
then
sudo mv dyld_sim dyld_sim.orig
else
echo "ERROR: dyld_sim does not exist"
exit 256
fi
}
APP=$1
if [ -e "$APP" ];
then
echo "Fixing Xcode instance \"$APP\" for El Capitan beta 6"
else
echo "ERROR: first argument \"$APP\" must be a path to an Xcode app"
echo "Usage: $0 <path-to-xcode>"
exit 256
fi
PLATFORMS=$APP/Contents/Developer/Platforms
IOS_LIB_DIR=$PLATFORMS/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
WATCH_LIB_DIR=$PLATFORMS/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/lib
if [ -d "$IOS_LIB_DIR" ];
then
cd $IOS_LIB_DIR
move_dyld_sim
echo "Fixed iPhoneSimulator"
else
printf "ERROR: could not find iOS Simulator directory:\n $IOS_LIB_DIR\n"
exit 256
fi
# I think this only applies to Xcode 7
if [ -d "$WATCH_LIB_DIR" ];
then
cd $WATCH_LIB_DIR
move_dyld_sim
echo "Fixed WatchSimulator"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment