Skip to content

Conversation

@Saadnajmi
Copy link
Collaborator

Summary:

This PR is split out from #2766 to help make it smaller.

Previously we had the code @compatibility_alias UIImage NSImage which is basically an objective C runtime way of doing #define UIImage NSImage. We don't quite like this, since we are defining the symbol UIImage in an Appkit context. We have a better pattern we can copy from RCTPlatformView --> RCTPlatformImage. The RCTPlatform prefix basically means it's NS on Appkit and UI on UIKit. This is as opposed to something like RCTUIView, where on iOS it's a typedef, but on macOS it's a subclass that adds stuff to NSView to make it more compatible with UIView.

All in all, this should mostly be a rigorous find/replace to make the code slightly more strict, but have no behavioral changes

Test Plan:

RNTester runs locally.

@Saadnajmi Saadnajmi requested a review from a team as a code owner December 22, 2025 06:02
@Saadnajmi Saadnajmi changed the title refactor: introduce RCTPlatformImage refactor: introduce RCTPlatformImage Dec 22, 2025
@Saadnajmi Saadnajmi changed the title refactor: introduce RCTPlatformImage refactor: introduce RCTPlatformImage (1/2) Dec 23, 2025
@Saadnajmi
Copy link
Collaborator Author

CI is currently broken but I can build all the slices locally, so I'm going to merge this to unblock other PRs

@Saadnajmi Saadnajmi merged commit 5406504 into microsoft:main Dec 23, 2025
15 of 27 checks passed
@Saadnajmi Saadnajmi deleted the rctplatformimage branch December 23, 2025 22:55
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.

2 participants