title: Xcode generating Swift Packages for iOS
body: <p>I am trying to create Swift Packages using the built-in features of XCode 11, but I am having issues. I am able to create generic Swift Package (no platforms) and Swift Package for Mac (platform .macos), but when I try to create ones for iOS only, the compiler tells me that UIKit can not be imported.  I see the message:</p>
  <p>&quot;UIKit is not available when building for MacOS. Consider using '#if !os(macOS)' to conditionally import this framework.&quot;</p>
  <p>I am using XCode to generate this package, not any command line generation of a Swift Package. The package does not have an Xcode project file associated with it, it is simply a package. If I place conditional compiles around the iOS code, the project builds successfully because it skips the iOS portion. However, this way does not show me any compile errors that might be in the code!</p>
  <p>If I do compile, and publish with the conditional macros, I can then import the Swift Package into an iOS project, and the code compiles.  However, debugging takes forever, since if I have an compile error in the package, I have to edit the Package, commit, push, update, then run it within the Mac project to see if I got it right. I would like to have the Swift Package correct compile the code, so I can fix it there.</p>
  <p>Help?  Thanks!</p>