-
Hello! I recently discovered your project and have decided to restructure my app similar to yours. I haven't had any issues replicating the structure, I just had a question about rationale. Is there a reason that you have the swift package at the root level and the xcode project embedded in the App/ folder? I found it a bit unintuitive to set it up this way, because the app is the actual product, and the swift package just contains the code used by the app. Additionally, someone cloning the project would most likely try to open the swift package in xcode rather than the xcodeproj, which is what is actually needed. Is there any issue with putting the xcode project at the root level and having the swift package embedded within? Even better would be to have them both living at the same level, but I'm not sure if there is some technical issue with setting things up that way. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The most important benefit for my team is that |
Beta Was this translation helpful? Give feedback.
-
I watched the link that @andreyz provided (here, very informative btw!) and was able to deduce what I wanted to know. It seems that the initial project structure had an Xcode workspace containing both the app project and the swift package. The swift package still lived at the root, and the app project still lived in the App/ folder. I like this structure because the workspace lives at the root and is more obvious for new developers. However, this workspace does not currently exist in the repo, so I had to track it down in the commit history to figure out why they changed it. The workspace was removed in #122, which provided pretty much exactly what I was looking for:
It would seem that the reason they want the swift package at the root is so that it can be referenced by other repos via SPM. This is not a concern for my use case because no other projects at my company will need to depend on that code, but it can certainly be restructured later if that is needed for some reason. Of the three options suggested here, I like 1 (top-level project with nested package) and 3 (workspace). I think I would prefer 1 for my case because it emphasizes the app as the primary product, and it would require minimal changes from my current project structure. |
Beta Was this translation helpful? Give feedback.
I watched the link that @andreyz provided (here, very informative btw!) and was able to deduce what I wanted to know.
It seems that the initial project structure had an Xcode workspace containing both the app project and the swift package. The swift package still lived at the root, and the app project still lived in the App/ folder. I like this structure because the workspace lives at the root and is more obvious for new developers. However, this workspace does not currently exist in the repo, so I had to track it down in the commit history to figure out why they changed it.
The workspace was removed in #122, which provided pretty much exactly what I was looking for: