Repository navigation
fix(macos): build against react-native-macos 0.81 and add a macOS CI job - #179
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #100
Adding the macOS CI job surfaced two build breaks in the library's macOS support, both present in 2.0.0.
1.
UIImageis gone in react-native-macos 0.81react-native-macos 0.81 replaced
@compatibility_alias UIImage NSImagewith theRCTPlatformImagemacro; 0.76 (our peer floor) has only the alias.RNCProgressViewnow usesRCTPlatformImagewhen it's defined andUIImageotherwise. The manager'sRCT_EXPORT_VIEW_PROPERTY(…, UIImage)is unchanged: it only selects+[RCTConvert UIImage:], which returnsRCTPlatformImagein 0.81.2. The Fabric subspec compiled UIKit code on macOS
With
RCT_NEW_ARCH_ENABLED=1, thefabricsubspec addedios/Fabricto the macOS target too:Those sources are now
ss.ios.source_files.CI
New
macosjob with a NewArch / OldArch matrix like iOS:pod installinexample/macos, thenxcodebuild -destination 'platform=macOS'. Also commitsexample/macos/Podfile.lock.Verified locally
xcodebuildpasses for both architectures (it fails on master with the errors above).RCTThirdPartyComponentsProviderinsertsNSClassFromString(@"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