Skip to content

fix(macos): build against react-native-macos 0.81 and add a macOS CI job - #179

Merged
Naturalclar merged 2 commits into
masterfrom
ci/macos
Nov 25, 2026
Merged

Naturalclar merged 2 commits into
masterfrom
ci/macos

Conversation

@Naturalclar

@Naturalclar Naturalclar commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Closes #100

Adding the macOS CI job surfaced two build breaks in the library's macOS support, both present in 2.0.0.

1. UIImage is gone in react-native-macos 0.81

macos/RNCProgressView.h:15:40: error: unknown type name 'UIImage'; did you mean 'CIImage'?

react-native-macos 0.81 replaced @compatibility_alias UIImage NSImage with the RCTPlatformImage macro; 0.76 (our peer floor) has only the alias. RNCProgressView now uses RCTPlatformImage when it's defined and UIImage otherwise. The manager's RCT_EXPORT_VIEW_PROPERTY(…, UIImage) is unchanged: it only selects +[RCTConvert UIImage:], which returns RCTPlatformImage in 0.81.

2. The Fabric subspec compiled UIKit code on macOS

With RCT_NEW_ARCH_ENABLED=1, the fabric subspec added ios/Fabric to the macOS target too:

ios/Fabric/RNCProgressViewComponentView.h:1:9: fatal error: 'UIKit/UIKit.h' file not found

Those sources are now ss.ios.source_files.

CI

New macos job with a NewArch / OldArch matrix like iOS: pod install in example/macos, then xcodebuild -destination 'platform=macOS'. Also commits example/macos/Podfile.lock.

Verified locally

  • macOS xcodebuild passes for both architectures (it fails on master with the errors above).
  • Old architecture: the example app launches, loads the bundle from Metro and keeps running.
  • New architecture: the app builds but crashes on launch. RCTThirdPartyComponentsProvider inserts NSClassFromString(@"RNCProgressViewComponentView"), which is nil on macOS. That's a separate, pre-existing problem that needs a macOS Fabric component view; filed as macOS: app crashes on launch with the New Architecture (no RNCProgressViewComponentView) #180. The NewArch CI job still guards compilation.

Titled fix(macos), so merging releases 2.0.1.

🤖 Generated with Claude Code

Naturalclar and others added 2 commits November 25, 2026 14:24
react-native-macos 0.81 dropped its UIImage alias for NSImage in favour of
the RCTPlatformImage macro, so macos/RNCProgressView failed to compile
("unknown type name 'UIImage'"). Use RCTPlatformImage when it exists and
fall back to UIImage for older react-native-macos (0.76 still has only the
alias).

Add a macOS job to CI (old and new architecture) building the example app.

Closes #100

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With RCT_NEW_ARCH_ENABLED=1 the fabric subspec added ios/Fabric to the macOS
build too, which fails on 'UIKit/UIKit.h' file not found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CI for macOS

1 participant