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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:08:26+00:00 2026-05-28T01:08:26+00:00

I’m working on an iOS app and have broken the codebase into two separate

  • 0

I’m working on an iOS app and have broken the codebase into two separate projects: a client library for a web service, and an app project that depends on the client library.

Both projects have been added to a single Xcode workspace with the dependency appropriately declared.

Each project has its own git repository. Currently I have the two projects checked out to two separate directories, and I manage the two git repositories independently of each other. The only place where the dependency between these two pieces of code is currently defined is in the app’s Xcode project.

However, I’m wondering whether I should add the client library git repository as a git submodule of the app’s repository. This feels right conceptually but I haven’t used git submodules before and I’m wondering if there are any gotchas with using this approach with Xcode?

(I can find plenty of blog posts on how to use Xcode workspaces to manage inter-project dependencies like this, and elsewhere plenty of documentation on git submodules, but I can’t find a single account of a tried and tested workflow for using both together. If you know of one, please post a link!)

  • 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-28T01:08:27+00:00Added an answer on May 28, 2026 at 1:08 am

    I’ve been involved in projects that have done this before, all using the following layout:

     * app-workspace
      * App.workspace
      * library [submodule]
       * Library.xcodeproj
       * library sources
      * app [submodule]
       * App.xcodeproj
       * app sources
    

    So the workspace knows about the projects and the build schemes. The workspace’s git repository knows about the submodules containing the projects.

    In practice it’s a lot of effort to keep the submodule definitions at the top level up to date, so we’ve usually ended up working on the submodules’ master branches. Committing specific versions to the workspace’s submodules happens when important changes are added: not too infrequently if the CI system builds from the top-level project.

    Of course, for the unit tests you can point the CI at each submodule independently, it’s only integration tests that will require the whole workspace. An important step to remember here – and one that I occasionally mess up – is that you should only update the submodule definition to a particular commit after you’ve pushed that commit to the shared origin of the CI and developer repos. If you forget this, you risk the checkout breaking for other people when the parent project refers to a commit of the submodule that they don’t have.

    The place where you potentially get issues with interacting with Xcode is in defining your build schemes. The approach I’ve most recently taken is to use the scheme editor to define the schemes I want to use as being shared (instead of per-user), and defined in the workspace at the top level instead of in the projects in the submodules. With that done, and those scheme definitions committed to git, turn off automatic scheme generation. Now all of your developers and the CI system all agree on how to build your product.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.