Recreate isowords project structure

Hey,
I'm trying to create a project structure just like isowords project has.
The README.md of the project contains some info, so does the first episode of the tour-of-isowords.
There is also a related PR that says the structured changed a little here: 122.

In the PR it says: "Top-level package with a nested project." is what isowords project is using.

I am trying to recreate that structure in xCode by settings up a brand new project, but no matter which way around and how I put one into the other I can't seem to recreate the structure. It always only shows the project or the package.

The isowords project has a top-level project "isowords", an included package by the same name. And inside a folder called "iOS" that contains Entitlements, Assests, etc.

Is there a slightly more detailed version on how I can create a project structure like isowords?

Can you explain more about what you mean by this:

You should be able to have the SPM package at the root of the repo (meaning Package.swift and Sources is at the root), and then an Xcode project inside a subdirectory, such as App. Then you can open the Xcode project and drag the entire parent directory into the project. Xcode will automatically recognize it as an SPM package.

1 Like

I recently started a project. As far as I understand correctly, are you interested in this project structure?

1 Like

Aah. :slight_smile:
The step of dragging the parent directory(the package) into the xCode project (right underneath the top item in the tree) was missing. Thank you.

I had tried to create a package project in xCode first.
Then an app project in a sub-directory inside of it. And in the last step of it used the option "Add to". It defaults to "Don't add to any project or workspace" but I changed it to be part of the (parent) package project.
And I just tried different combinations of first creating an app project and then the package and moving things around and also adding the package to the project. But it never ended up to be the same structure as isowords is. That's what I meant by "It always only shows the project or the package".

This is what the structure looks like now (just for a test I called it 'osiwords'):

[ EDIT: In case someone else stumbles upon this: Don't forget about the additional, empty Package.swift file in the app project. ]

A bit off topic, but this folder dragging feels like magic. Somehow not many people are aware, wish it would be more discoverable.

1 Like

Also: Do not name the package the same as the app project (as in my screenshot example osiwords). xCode will complain about circular dependencies.