When making a custom System Settings panel, I want the project to automatically move the prefpane file to /Library/PreferencePanes/. With Run Script, the build fails because of denial to perform the operation. Sudo doesn't help, too.
PREFPANE_SRC="${BUILT_PRODUCTS_DIR}/App.prefPane" PREFPANE_DST="$HOME/Library/PreferencePanes/"
echo "PrefPane source path: $PREFPANE_SRC" echo "PrefPane destination path: $PREFPANE_DST"
if [ -d "$PREFPANE_SRC" ]; then echo "Installing preference pane to ${PREFPANE_DST}" cp -R "${PREFPANE_SRC}" "${PREFPANE_DST}" else echo "Preference pane not found: ${PREFPANE_SRC}" exit 1 fi
It’d help if you post this stuff as text rather than screen shots. It’s much harder for me to see what’s going on from a screen shot. For this and other tips, see Quinn’s Top Ten DevForums Tips.
You can get the text of a build step failure from the Reports navigator. I talk about this, in a different context, in Command [something] failed with a nonzero exit code.
However, it looks like things are failing with Operation not permitted
, which is EPERM
. That suggests a sandbox issue. Do you have the User Script Sandboxing build setting enabled?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"