RxSwift: RxCocoa causes UIWebView link errors on UIKitForMac

Short description of the issue:

When building projects for UIKitForMac (Apple’s new Project Catalyst environment), RxCocoa fails to link because it expects UIWebView to be available. I created a sample project which demonstrates the issue at NGRxCocoaUIKitForMacLinkingIssue.

I think the solution here will probably be as simple as adding #if !targetEnvironment(UIKitForMac) around the parts of the codebase that expect UIWebView to be exposed by UIKit.

Expected outcome:

The project should link when built for UIKitForMac

What actually happens:

The project fails to link

Self contained code example that reproduces the issue:

No code needed, since just including the RxCocoa cocoapod in the project reproduces the issue

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

Tested with 5.0.0, though I suspect this is an issue with all versions

Platform/Environment UIKitForMac

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • easy, 100% repro

Xcode version:

  11.0 beta (11M336w)

Installation method:

  • CocoaPods

I have multiple versions of Xcode installed: (so we can know if this is a potential cause of your issue)

  • yes (11.0 and 10.2.1)
  • no

Level of RxSwift knowledge: (this is so we can understand your level of knowledge and formulate the response in an appropriate manner)

  • just starting
  • I have a small code base
  • I have a significant code base

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

That’s very old 😃