I finally figured it out.
For each target for which you want to conditionally include the settings bundle, choose its Project from the source list, choose the target, and switch to the “Build Phases” tab.
Click the “Add Build Phase” button and choose “Add Run Script”.
Then enter the following for the script:
if [ "${CONFIGURATION}" == "Debug" ]; then
cp -r "${PROJECT_DIR}/Settings.bundle" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app"
fi
Related Contents:
- How to Empty Caches and Clean All Targets Xcode 4 and later
- MobileDevice.pkg untrusted, cannot open Xcode after OS X update
- “No such module” when using @testable in Xcode Unit tests
- Swift: Understanding // MARK
- Xcode source automatic formatting
- Browse the files created on a device by the iOS application I’m developing, on workstation?
- “Header Search Paths” vs. “User Header Search Paths” in Xcode?
- Archives not showing up in Organizer for Xcode 4
- No TestFlight invite email gets sent for internal users
- How to check if command line tools is installed
- Better way of incrementing build number?
- How can I change the company name in the copyright template in Xcode 4?
- Changing the default header comment license in Xcode
- Failed to Attach to Process ID Xcode
- How can I use swift in Terminal?
- The resulting API analysis is too large when upload app to mac store
- how to add commas to a number in swift?
- How do I rename a project in Xcode 5?
- Run all of Xcode’s “Fix-it”s at once
- “Warning: unable to build chain to self-signed root for signer” warning in Xcode 9.2
- Install claimed to have succeeded, but application could not be found on device
- Can Xcode 6 and Xcode 5 coexist on the same computer?
- How do you codesign framework bundles for the Mac App Store?
- Use xcodebuild (Xcode 8) and automatic signing in CI (Travis/Jenkins) environments
- Ignore all warnings in a specific file using LLVM/Clang
- Enable code-folding by default
- macOS ‘wchar.h’ File Not Found
- How to change the Class Prefix in Xcode 4?
- x86 Assembly on a Mac
- Xcode only lets me run for an iOS device (no simulator)
- In Xcode how do I create a new workspace and add 1 project to it so that I can see the project and its files?
- Where is Info.plist in Xcode 13? (missing, not inside project navigator)
- How to change output directory for a target
- Swift Protocol Extensions overriding
- Xcode swift indexing forever
- Xcode letters beside files in Project Navigator
- Unable to get MacPort functionality after installing Xcode 4.3
- Xcode doesn’t show recent projects in recent projects list
- How to update Xcode?
- Could not cast value of type ‘UICollectionViewCell’
- Animating a constraint in Swift
- Why are there recovered references in my xcode project file?
- What is “UserInterfaceState.xcuserstate” file in Xcode project?
- How can I run older Xcode version on new macOS version?
- Xcode scheme pre-action script not running
- Xcode 7: changing product bundle identifier
- Xcode 4.1 can’t reinstall. App store says “installed”
- Could not read serialized diagnostics file: Invalid File: Invalid diagnostics signature
- xcode: Timestamped Event Matching Error: Failed to find matching element
- Building Qt Xcode Projects From the Command Line