Replies: 1 comment 1 reply
-
Since Observation is part of the Swift open source project it is available on all platforms that Swift is on, in particular Apple's platforms (iOS/macOS/etc...), Linux, Windows, and anything else out there supported by Swift. However, Apple made the choice to restrict Observation to only macOS 14+, iOS 17+, tvOS 17+ and watchOS 10+ because they would not be able to back port Observation's integration into SwiftUI. So that would lead people to believing they could use
Technically yes, Perception can be used on Windows and Linux, but since Observation is already available on Windows and Linux there isn't a lot of reasons to use Perception on those platforms. The only time I can think of where it's appropriate to use Perception on Windows/Linux is if you are writing code that will be used on both an Apple platform and a non-Apple platform, and if you are deploying to an older Apple platform. In that case you will use Perception so that it works on the older Apple platforms, and then when that code runs on Windows/Linux it fallback to just the regular Observation framework.
Perception has all of the same limitations because it is a 100% faithful back port. Ideally we will archive this repo once iOS "21" is released, and then everyone would just use the standard Observation tools. |
Beta Was this translation helpful? Give feedback.
-
I am confused about Observation (and Perception) and I have the following questions:
Observation is available since Swift 5.9 on macOS, Windows and Linux?
Observation on macOS need macOS 14+. Why using Observation open-source pkg is not possible on non-SwiftUI app on macOS 13?
Perception is kind of back porting of Observation so we can use on macOS 13, is Perception can be used on Windows and Linux?
Observation have some rabbit-holes (no didSet semantic, problem in class init etc..). Is Perception have the same limitations?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions