If memory serves correct, both of these selections (active scheme and destination) have nothing to do with the generated project, and are instead components of user state (i.e. preferences, combined with how Xcode was last used.)
Regenerating the project (swift package generate-xcodeproj
) will leave them however you last had them set.
Both destinations are (or at least could be) valid for a package. There is currently no way to restrict which platforms a package supports, but that is undergoing the evolution process right now. Probably you were working on a different iPhone project before you first opened the generated project?
A package could contain multiple executables—or none at all—, so there often is no logical default. I think if there is no existing selection from having Xcode open previously, then it just picks the first scheme alphabetically, which in your case was probably the package‐wide scheme, instead of the scheme for a particular executable.