You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Obligatory intro - Inject is awesome, thank you!)
Hello, I develop an app that shares view code amon iOS and WatchOS extension targetys in a library. The library has set WatchOS 7.0 as a minimum target (see below), but adding Inject a dependency produces a lot of errors with SwiftUI APIs not available before WatchOS 6.
Could you please mark the classes (or a whole package - I don't know if it's possible) as WatcOS 6.0+ only?
Something like @available(watchOSApplicationExtension 6.0, *) should help.
Or is there a better way? I am confused as for why does Xcode try to build the package for all WatchOS versions if it's only going to be used in a library that targets 7.0+?
Thank you! Tomas
Error Group
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Inject.swift:18:42: 'Animation' is only available in watchOS 6.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Inject.swift:45:30: 'AnyCancellable' is only available in watchOS 6.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Inject.swift:43:33: 'ObservableObject' is only available in watchOS 6.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/Hosts.swift:3:45: cannot find type 'UIViewController' in scope
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/Hosts.swift:4:35: cannot find type 'UIView' in scope
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/Hosts.swift:41:24: method does not override any method from its superclass
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/KitFrameworks.swift:5:11: cannot find type 'UIView' in scope
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/KitFrameworks.swift:6:11: cannot find type 'UIViewController' in scope
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/SwiftUI.swift:6:44: 'View' is only available in watchOS 6.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/SwiftUI.swift:14:74: 'View' is only available in watchOS 6.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/SwiftUI.swift:5:26: 'View' is only available in watchOS 6.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/SwiftUI.swift:6:31: 'some' return types are only available in watchOS 6.0.0 or newer
<redacted path>/SourcePackages/checkouts/Inject/Sources/Inject/Integrations/SwiftUI.swift:14:61: 'some' return types are only available in watchOS 6.0.0 or newer
The text was updated successfully, but these errors were encountered:
This seems it might work, but I have been unable to get the shared library to work with Inject because of other problems. Would you try adding it? I created a PR: #23
(Obligatory intro - Inject is awesome, thank you!)
Hello, I develop an app that shares view code amon iOS and WatchOS extension targetys in a library. The library has set WatchOS 7.0 as a minimum target (see below), but adding
Inject
a dependency produces a lot of errors with SwiftUI APIs not available before WatchOS 6.Could you please mark the classes (or a whole package - I don't know if it's possible) as WatcOS 6.0+ only?
Something like
@available(watchOSApplicationExtension 6.0, *)
should help.Or is there a better way? I am confused as for why does Xcode try to build the package for all WatchOS versions if it's only going to be used in a library that targets 7.0+?
Thank you! Tomas
The text was updated successfully, but these errors were encountered: