react-native-safe-area-context
react-native-safe-area-context copied to clipboard
feat: add react-native-macos support
Summary
~~Adds react-native-macos support and integrates react-native-test-app.~~
~~Downside: downgrades react-native from ^0.74.2 to ~0.73.9 in order to keep all React Native versions on the same minor (which reduces the chance of duplicated dependencies like Metro).~~
Update:
- Adds react-native-macos support
- Adds a new example folder,
example-macos, based on react-native-test-app. This is a compromise to allow us to continue to develop Fabric onreact-nativev0.74 whilst still having access toreact-native-macoswhich is limited to v0.73 for now. Mixing them in the same folder would result in clashes of tooling like the CLI and Metro, as discussed below.
Test Plan
I've ported the existing iOS sample app to macOS so we can test it manually. Not sure whether this repo has automated tests.
Status
PR now ready for review as the following tasks have been completed.
See now-complete checklist of tasks
- [x] Get the macOS example app to build.
- It's complaining about
/Users/jamie/Documents/git/react-native-safe-area-context/example/macos/Pods/Headers/Public/React-Core/React/RCTBridgeModule.h:172:1 Property with 'retain (or strong)' attribute must be of object type. It sounds like this issue, but I've not been able to figure out how to fix it. - It's also complaining about
_providerViewand_bridgebeing unavailable. Perhaps due to the same root cause. - Would be nice if the Pods project would stop targeting macOS
10.6. It's specified in the generatedexample/macos/Pods/Pods.xcodeproj/project.pbxproj, but I'm not sure how to configure that declaratively.
- It's complaining about
- [x] Check whether all the other platforms are working.
In future
Once [email protected] is available, it would be nice to use a single example directory again and use React Native Test App to manage all the platforms.