Skip to content

Instantly share code, notes, and snippets.

@ole
Last active April 23, 2018 14: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 ole/c862afdafb21658e54b40c7e362129ad to your computer and use it in GitHub Desktop.
Save ole/c862afdafb21658e54b40c7e362129ad to your computer and use it in GitHub Desktop.
A script for setting `UIFileSharingEnabled` and `LSSupportsOpeningDocumentsInPlace` in Xcode debug builds.
#!/bin/sh
if ( [ "$CONFIGURATION" == "Debug" ] ) then
echo "Enabling filesharing flags for '$CONFIGURATION' configuration in "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}""
/usr/libexec/PlistBuddy -c "Set :UIFileSharingEnabled true" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :LSSupportsOpeningDocumentsInPlace true" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment