XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

How to add other xcodeproj into xcworkspace?

Open lutluthfi opened this issue 4 years ago • 1 comments

Question

Hi, I just have a simple question. I need to add existing xcodeproj into generated xcworkspace to achieve modularity. I need a best practice about the project.yml file about how to xcodeproj into generated xcworkspace?


Expectation

Here is my expectation result Screen Shot 2021-08-25 at 10 11 38

lutluthfi avatar Aug 25 '21 03:08 lutluthfi

AFAIK XcodeGen generates xcodeprojs but not xcworkspaces.

Xcode Workspace referencing different projects is as simple as:

<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "group:My App.xcodeproj">
   </FileRef>
   <FileRef
      location = "group:Pods/Pods.xcodeproj">
   </FileRef>
</Workspace>

So you might as well just write this XML yourself (or check in source control if paths are fixed), rename it as contents.xcworkspacedata and put it in a *.xcworkspace folder.

VaslD avatar Feb 16 '22 14:02 VaslD