I'm working on an app and want to include a Watch target.
My app uses Swift Package Manager and 1 package (that I created) for doing repetitive utilities such as showing a "Loading..." view (in iOS only)
The Swift Package Package
has supported platforms set to:
platforms: [
.iOS(.v14)
]
However, when I try to start editing my Watch OS SwiftUI ContentView, the preview errors out stating:
iOS storyboards do not support target device type "watch".
(This is from the Swift Package's Loading.storyboard.)
The Swift Package is UIKit only - no Swift UI. The "Loading..." view I am using for iOS is a View Controller - obviously not meant for Watch OS.
I cannot run the target to the Watch app - it shows a lot of UIKit errors from the Swift Package, like Cannot find type 'UIView' in scope
and on and on.
The Watch app does not need this package at all.
I thought that if the platforms
does not specify .watchOS*
then it wouldn't try to apply it to my Watch target.
How do I tell this target not to link/load this package?