Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7727145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:23:11+00:00 2026-06-01T05:23:11+00:00

Is it possible to remove a file using a build phase in xcode 4

  • 0

Is it possible to remove a file using a build phase in xcode 4 based on if it is release or dev?

If so has anyone got an example?

I have tried :

      if [ "${CONFIGURATION}" = "Debug" ]; then
      find "$TARGET_BUILD_DIR" -name '*-live.*' -print0 | xargs -0 rm
      fi

This prints CopyStringsFile

 "build/Debug-iphonesimulator/Blue Sky.app/PortalText-live.strings" CDL/PortalText-live.strings
cd "/Users/internet/Desktop/iPhone Template/iPhonePortalTemplate/CDL.Labs"
setenv PATH "/Developer/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copyStrings --validate --inputencoding utf-8 --outputencoding binary --outdir "/Users/internet/Desktop/iPhone Template/iPhonePortalTemplate/CDL.Labs/build/Debug-iphonesimulator/Blue Sky.app" -- CDL/PortalText-live.strings

But does actually remove the file from the bundle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:23:13+00:00Added an answer on June 1, 2026 at 5:23 am

    The only way I’ve ever had different files, is having a separate Target, and only include certain files in certain targets.

    EDIT WITH AN EXAMPLE

    Ok, I’ve done exactly the same in another project. We had a DefaultProperties.plist file, which was included in the target.

    We then had 3 copies of this, NOT included in the target, ProdProperties.plist, TestProperties.plist, UatProperties.plist.

    We built for environments on the command line, using xcodebuild, as it was built using an automated build server (Bamboo).

    Prior to executing xcodebuild, we would run this:

    cp -vf "./Properties/Environments/${environment}Properties.plist" ./Properties/shared/DefaultProperties.plist
    touch Properties/shared/DefaultProperties.plist
    

    with $(environment) being passed into the script.

    You could do something like this with the RunScript phase in Xcode.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the Egit plugin, is it possible to permanently remove a file from source
Possible Duplicate: Can't remove Default.png? I am using Xcode 4, but I am sure
Possible Duplicate: remove duplicate from string in PHP Have a string like: $str =
I'm using an XML file added into my project with following properties : Build
I can currently remove the last line of a text file using: var lines
I still very new using Subversion. Is it possible to have a working copy
Possible Duplicate: Remove duplicates from a List<T> in C# i have a List like
Is this possible using php + ffmpeg? ffmpeg-php has the ability to: Ability to
I have got a list of elements that im trying to delete using the
Is it possible via any Unix utility to read chunks of a remote file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.