-
Notifications
You must be signed in to change notification settings - Fork 151
[Xcode 15] Silence warning with mismatched NSView.clipsToBounds property #1864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Saadnajmi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear: This change will silence a warning, but not actually change any behavior?And since the default behavior changed with Xcode 15, it's likely we need extra work to ensure our views render correctly?
I did a brief look and it seems that clipsToBounds is actually set by this JS property: https://reactnative.dev/docs/next/layout-props#overflow . So it sounds like something we should properly support :D
I think it will just work. for the most part. We've been using the API as though it existed and now it does so setting it should now get the intended behavior, but it's not documented as being undefined anymore. Where we could run into issues (when compiling with Xcode 15):
|
I think we got rid of our last drawRect override with 0.71, and (potentially) with Fabric going forward we may not support drawRect at all. Good to know! |
## Summary: Back in macOS 13, Apple made a breaking change to NSView (I know, rare) to set the default of `clipsToBounds` from true to false to match iOS. We did some working around of it (See #1864 ). Now that our minimum is above macOS 13, we can remove this property. ## Test Plan: Booting paper and fabric seem fine.
Please select one of the following
Summary
When including react-native-macos public headers with Xcode 15, we get an error that the
clipsToBoundsproperty declared on RCTUIView doesn't match the one now declared in AppKit as of the macOS 14.0 SDK. AppKit has finally publicized this property, but it is marked as atomic rather than nonatomic.When we're building exclusively with Xcode 15, we can remove this override. But for now, let's just make the property declarations match.
Note, this isn't actually blocking building react-native-macos because these warnings aren't turned on as errors (they probably should be). But if a consumer has warnings treated as errors, this will fail their builds.
Changelog
[MACOS] [FIXED] - Silenced warnings with Xcode 15.
Test Plan
Just counting on CI since this really should be a non-functional change