ReactiveX / RxSwift

Reactive Programming in Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't compile RxSwift for visionOS

RobertDresler opened this issue · comments

On Xcode 15 beta 8, compiler directive os(iOS) is no longer true for visionOS. Therefore, RxSwift can't be compiled for visionOS platform.

E.g. these errors:

Screenshot 2023-09-06 at 18 05 07

It can be fixed by replacing #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) with #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) or even better with #if canImport(...).

Happy to accept a PR around this!

i think it would be preferable to use || os(visionOS) where needed because there are APIs that are only available to iOS, which would also apply to visionOS itself.

@freak4pc I opened PR