5

I am looking for a way to enable the UIFileSharingEnabled flag for only a debug variant - so I can change the contents of the documents folder - but I don't want end users to be doing the same.

I guess i could use a run script to do it, though not sure how to get the active configuration name to the script.

Amicable
  • 3,115
  • 3
  • 49
  • 77
Nick Hingston
  • 8,724
  • 3
  • 50
  • 59

1 Answers1

9

worked it out:

if [ ${CONFIGURATION} = "Debug" ]; then
    /usr/libexec/PlistBuddy -c "Set :UIFileSharingEnabled YES" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
else
    /usr/libexec/PlistBuddy -c "Set :UIFileSharingEnabled NO" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
fi
Nick Hingston
  • 8,724
  • 3
  • 50
  • 59