-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project w/ 2 app targets loses linked libraries to 2nd app after Xcode modification #1017
Comments
This seems to be related to e.g. a project defined like this behaves as expected
|
Just wanted to bump this and say I've tested with XcodeGen 2.24.0, but the exact same behavior remains. |
Have you managed to solve it with projectreferences in Xcodegen 2.26.0? |
I also want to bump this. I have a similar project structure and am seeing the same behavior described in this issue. I'm running Xcode 14.2 and Xcodegen 2.35.0. |
@mthole I am investigating this. Unfortunately, I am not familiar -yet- with Xcodegen's source code. I did try a sort of brute force approach to understanding the issue. I performed several tests to that effect and this one stands out:
Here is a patch that shows the changes made by Xcode in step 2. The next step would be to identify what is wrong in the xcodegen-generated pbxproj. |
@mthole since you may be familiar with the generator for this file, does anything stand out? |
Sorry, nothing jumps out immediately. I've lost most of the context I had here back in 2021. |
I have a moderately complex XcodeGen set up involving multiple internal libraries/frameworks and produces multiple application targets. It works great, until you try to modify the project in Xcode (e.g. by adding a new file). Xcode then ends up stripping the libraries from all but the first application target(!)
Simplified Reproduction
I've created a simplified example project to illustrate the issue:
XcodeGenBugExample.zip
make
to run xcodegen on the 3 included projectsApp1
andApp2
targets. They both link to thelibLibraryA.a
andlibLibraryB.a
libraries. All is well.Go and add a new .swift file to the App target. (Or do a number of other Xcode operations that trigger whatever re-evaluation is happening...). I added
File.swift
to theApp1
andApp2
targets.Examine the
App1
andApp2
targets. Notice thatApp2
is now missing bothlibLibraryA.a
andlibLibraryB.a
. Sadface!We expect App1 and App2 to still be linked to both libraries. Mysteriously, only App1 is!?
Next Steps
I've been using Xcode 12.4. If anyone has any ideas, I'm happy to help investigate further here.
The text was updated successfully, but these errors were encountered: