Last active
March 15, 2016 15:11
-
-
Save 0xced/ac650aae583dc6a24312 to your computer and use it in GitHub Desktop.
Copy and codesign libReveal.dylib in Debug configuration (for use in a run script build phase)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if [ "${CONFIGURATION}" != "Debug" ]; then | |
exit 0 | |
fi | |
REVEAL_APP_PATH=$(mdfind -onlyin / "kMDItemCFBundleIdentifier == com.ittybittyapps.Reveal" | head -n 1) | |
if [ ! -d "${REVEAL_APP_PATH}" ]; then | |
echo "warning: Reveal.app not found." | |
exit 0 | |
fi | |
LIBREVEAL_SRC_PATH="${REVEAL_APP_PATH}/Contents/SharedSupport/iOS-Libraries/libReveal.dylib" | |
if [ ! -f "${LIBREVEAL_SRC_PATH}" ]; then | |
echo "warning: Reveal dynamic library not found. (${LIBREVEAL_SRC_PATH})" | |
exit 0 | |
fi | |
LIBREVEAL_DST_PATH="${CODESIGNING_FOLDER_PATH}/libReveal.dylib" | |
cp -v -p "${LIBREVEAL_SRC_PATH}" "${LIBREVEAL_DST_PATH}" | |
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then | |
codesign -fs "${EXPANDED_CODE_SIGN_IDENTITY_NAME}" "${LIBREVEAL_DST_PATH}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Improvements over Reveal’s suggested Dynamic Library Integration:
libReveal.dylib
to your project, so it means your coworkers don’t necessarily have to install Reveal.libReveal.dylib
when you are debugging your app only, so there is no risk to publish your app on the App Store with the library embedded.EXPANDED_CODE_SIGN_IDENTITY_NAME
instead ofCODE_SIGN_IDENTITY
which is required if you have multiple code signing identities.I also recommend Integrating Reveal without modifying your Xcode project.