Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIFileSharingEnabled on debug variant only

Tags:

xcode

ios

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.

like image 838
Nick Hingston Avatar asked Nov 25 '10 11:11

Nick Hingston


1 Answers

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
like image 54
Nick Hingston Avatar answered Oct 23 '22 20:10

Nick Hingston