I followed the docs here to create a new "local" package. My goal is to have a few apps in one git repo, along with a couple reusable packages in that same git repo. The docs worked for creating a package within the first app project. But I don't see how to add the package to another app project. I've tried "Add Package Dependency" and I've tried dragging the folder to Xcode's project navigator panel. Nothing builds. And nothing even looks the same as the first app, in which the package files are browsable and editable.
In Package.swift
you use the path
initializer to make one package depend on another local package:
let package = Package(
...
dependencies: [
.package(path: "../LocalPackage"),
...
],
In Xcode 16.3 when adding packages to a project, there's an Add Local
button at the bottom-left of the panel (while the "Add Package" is at the bottom-right).
When you organize this way, just be aware Xcode won't open at the same time two projects or packages that have the same local package dependency. (Granting that the Apple developer forum is the designated place for Xcode questions.)