I'm attempting to migrate my iOS app to support builds for the UIKitForMac target (project Catalyst!).
I'm attempting to change an Info.plist flag based on the TARGET_OS, but I'm not sure how can I detect the target OS from a build phase's run script. Here is what I'm trying to do:
echo "[DEBUG-PRINT] ---> Update flag"
if [ ${TARGET_OS_UIKITFOTMAC} ]; then
echo "[DEBUG-PRINT] ---> IF succeeded"
/usr/libexec/PlistBuddy -c "Set :LSSupportsOpeningDocumentsInPlace YES" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
fi
What am I doing wrong? Any ideas?
I ended up adding a pre-action run script to my scheme: