Currently, you cannot build an iOS app using Swift Package Manager (Swift Playgrounds technically work and are SwiftPM but they use some special magic so I'm not counting them).
If you wan't to build an iOS app then you must use an Xcode project.
If you want to build a command line app, or terminal app, or plain Mac app (no UI) then you can use a SwiftPM app - this is how all Swift server apps are built
I believe the issue is that an MyApp.xcodeproj file is needed for Xcode to run the app. This includes the many build settings, configs, etc. It's possible that SPM will someday support all those settings, but not yet.
One thing you can do is have an Xcode project, but have literally all your code in an SPM package. inside the project.
A workflow that I use consistently is to use an Xcode Workspace that contain the Swift package and the Xcode project for the demo app. Then I add the Swift package as a local package to the Xcode project. This way I have schemes for both and I can easily work on the package while the demo app scheme is active to instantly spot issues with the package’s public interface.
Xcode 16 seems to like this setup better than opening the Xcode project and the package in separate windows.
I can even host the package and the Xcode project in separate Git repos and commit to each repo individually using Xcode’s UI.