Closed sergeirr closed 1 year ago
Additional description: https://developer.apple.com/forums/thread/731732
Thanks for your PR.
Is there any way we could add a CI check to make sure this doesn't break with future iterations?
I'm not sure about this. I don't know if it is possible to "Build to Preview" from the command line to reproduce the problem.
Okay I'll look into this. I wouldn't want to merge without some assurance from CI. I'll try my best to get it sorted asap.
I see. Another workaround for developers is to temporary remove the iOS main app target from the watchOS scheme when you want to work with watchOS SwiftUI Previews.
@davdroman You can mention me if you need some help with an example project to reproduce this.
@sergeirr yes please, I'd certainly appreciate an example project.
@davdroman This is the project https://github.com/sergeirr/WatchOSIntrospect There are 2 branches (excluding main):
Thanks! This is very helpful to get going.
For some reason Xcode watchOS SwiftUI preview attempts to build this package against watchOS SDK. Fixed by adding os type check. Tested with:
Fixes #111