Skip to content

Instantly share code, notes, and snippets.

@ashwinb
Created February 3, 2011 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashwinb/809184 to your computer and use it in GitHub Desktop.
Save ashwinb/809184 to your computer and use it in GitHub Desktop.
Wrapper script to run iPhone simulator binaries on the command line
#!/bin/bash
# We need to tell DYLD where to find the libraries. The library paths are
# built into the binary as absolute paths, so when that does not work DYLD
# looks into these environment variables. The reason we need so many
# DYLD_LIBRARY_PATHs is because some frameworks link against their private
# .dylibs which we need to find correctly as well.
export SDK=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
export FWK=$SDK/System/Library/Frameworks
export DYLD_FRAMEWORK_PATH=$FWK:$SDK/System/Library/PrivateFrameworks
export DYLD_LIBRARY_PATH=$SDK/usr/lib:$SDK/lib:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$FWK/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$FWK/CoreGraphics.framework/Resources
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$FWK/JavaVM.framework/Versions/1.3.1/Libraries
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$FWK/OpenGLES.framework
$*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment