Swift package generate-xcodeproj


swift package generate-xcodeproj

Results in a pre Xcode 11 style project. I'd like a modern project to be generated. Are there any options? Maybe I'm missing something.

With Xcode 11 you can simply open a Swift package directly, without needing to generate an intermediary Xcode project. Navigate to your directory and type xed ..

Appreciate the response. That’s not quite the problem I was trying to solve.

Once you open a Package.swift file in XCode there is no way to add an iOS Target.

If you start with an iOS project, the only way to add Swift Packages is through a hosted git server. Unless I am missing something.

I know you can do local repositories within a swift package. It would be nice to add local repositories to “Apple OS” targets.

I ended up creating a workspace for what I was trying for o accomplish. Probably better hygiene anyway.

You can add local repositories in an arbitrary Xcode project: the UI for adding packages has the ability to enter an arbitrary package URL instead of selecting from a hosted GitHub instance or similar. You can put a file:// URL into there.