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 7541873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:00:35+00:00 2026-05-30T08:00:35+00:00

Is there any way to use a script to add files to an Xcode

  • 0

Is there any way to use a script to add files to an Xcode target?

I’m not talking about build rules or phases here; I know about those. I have a project that requires about 3500 files to be imported into over 100 targets. I’d rather not do this by hand as said files are spread across a few directories and selecting them all by hand would take days to do.

The source code was originally from a makefile-based project that I’m converting to Xcode. I can hack up the makefiles easily enough to create lists of files in their relevant directories relative to $(SRCROOT) easily enough using some perl magic. What I don’t know is what to do with those lists.

It would be ideal if I could somehow run a script that read in the list, found the file inside Xcode (since the files will have already been added to the project as file references and folder groups), then added it to a single target that I could define. Just being able to do this would mean that the entire job of importing and configuring the sources for all the targets would take hours rather than days.

Is this possible to achieve somehow?

Many thanks in advance!
-KT

  • 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-05-30T08:00:36+00:00Added an answer on May 30, 2026 at 8:00 am

    You have your work cut out for you.

    Possibly as a last resort workaround…

    When I looked at diff between same project after adding a file, it makes changes to
    project.pbxproj fortunately in text.

    If there is no other way, possibly post copying your files appropriately, you might be
    able to parse/edit this file to reconstruct it…tricky YES, and likely unsupported.

    I did find some additional info in this file by Dan Wright A brief look at the Xcode project format
    and More on the Xcode project format

    Seems the success of the approach will depend on being able to get PBXFileReference(s) for your files.

    Good luck

    Regards

    JimZ

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

Sidebar

Related Questions

Is there any way to use C# to build a container application where each
Is there any way to use inheritance in database (Specifically in SQL Server 2005)?
Is there any way to use a constant as a hash key? For example:
Is there any way to use AppleScript (or something else) to query currently running
Is there any way to use Relative path when configuring subversion externals. For example
Is there any way to use server controls in ASP.NET MVC? Specifically I need
Is there any way to use ActiveRecord calculations while also acquiring relevant field names?
Is there any way to Use the Builtin ScrollBars that comes with each .Net
Is there any way to use conditional statements in CSS?
Is there any way to use an Adobe AIR application as a local http

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.