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

  • Home
  • SEARCH
  • 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 6939175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:35:19+00:00 2026-05-27T12:35:19+00:00

I need to reference a project in a Xcode workspace by an environment variable.

  • 0

I need to reference a project in a Xcode workspace by an environment variable. An Xcode workspace file might look like this:

<Workspace
   version = "1.0">
   <FileRef
      location = "group:../../Some/Dir/SomeLibrary.xcodeproj">
   </FileRef>
   <FileRef
      location = "group:SomeApp/SomeApp.xcodeproj">
   </FileRef>
</Workspace>

I want the SomeLibrary project to be referenced by an environment variable, so that the workspace file and projects can be used in different developer environments (the lib project is shared between several different projects). Any ideas on how to do this? Is the XML-format documented somewhere?

Thanks! 🙂

  • 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-27T12:35:19+00:00Added an answer on May 27, 2026 at 12:35 pm

    I think I need to answer this myself. Based on my research it is not possible to use a dynamic location (environment variable, source tree, etc) on workspace projects.

    Solution 1:
    You CAN achieve what I’m trying to do using symlinks. In my current workspace I’ve created one application-project, and a project entry which points to a symlink on the local file system. This way one can switch projects and have dynamic locations for the library-projects. I’m not sure if XCode treated this link properly when adding, so I manually added the project entry like this:

    <FileRef
        location = "group:Libraries/SomeLibrary/SomeLibrary.xcodeproj">
    </FileRef>
    

    Where SomeLibrary (IMPORTANT: The folder SomeLibrary need to be the symlink, or else XCode wont be able to find the project contents) is a symlink to my static library project somewhere else on the local file system. This way, developers can have different paths to the library, and one can easily switch versions when needed.

    Solution 2:
    Adding a static library project as a subproject and using cross-reference. For sub-projects, one can use Source Tree and use dynamic locations.

    I haven’t tested these solutions widely, so I’ll come back with a reply after using it for a while.

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

Sidebar

Related Questions

I have a project where I need to reference a variable declared in one
After converting an Xcode project to ARC (Automatic Reference Counting), I need to disable
Somebody ask me this question today . What is the need of reference in
I would like to be able to delete a project reference in a solution
I have a web service that I'd like to include as a project reference
I need to reference FSharp.Core to a Visual Web Developer Express project (C#), but
I have 2 projects. Project#2 has a reference to Project#1 Now I need to
I'm working on a project that I need to eliminate all references to the
I need a reference counter for an object not allocated on the heap. I
Say I have some 10 categories that I need to reference in a web

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.