hello, this is a helper library, and doesn’t really do anything on it’s own. This library is meant to be used as a dependency for other libraries — i.e. as a way to share code, and prevent duplicated logic.
Please see the version compatibility table for reference.
This library is being re-written to support both the new + old architecture. Please see this is issue for progress 😔
Overview:
-
RNIBaseView
: A shared/common “base view” to allow for making native components that work on both fabric (the new architecture) and paper (please see:RNIWrapperView
for an example implementation). -
RNIContentViewDelegate
: A delegate that let’s the conformingUIView
(written in swift) to manage + communicate with its associated parent fabric/paper view, and handle layout, receive props + async view commands from JS, and dispatch events from native. -
RNIViewLifecyleEvent
: a set of delegates for receiving common view lifecycle events between fabric + paper, as well as receiving events that are either fabric-only or paper-only. Please seeRNIBaseViewEventBroadcaster
for an overview of what events are supported. -
RNIContentViewParentDelegate
: Exposes useful properties and methods from the parent paper/fabric view (e.g. controlling size/layout, getting the layout metrics, etc). -
RNIBaseViewController
: A base implementation of a view controller that wraps a paper/fabric view and handles its sizing + layout when attached to non-react view. -
RNIUtilitiesModule
: A helper JSI module that allows for sharing sync data between swift and js, and sending async commands to either views that conform toRNIContentViewDelegate
, or objects that conform toRNIModuleCommandRequestHandling
(please see the js + swift impl. ofRNIDummyTestViewModule
for a crude example). -
Types and Parsing: Contains typescript definitions for native types (e.g.
UIKit
,CoreGraphics
primitives, etc) so they can be represented in JS, as well as the associated code to parse them in native (e.g.InitializableFromDictionary
,InitializableFromString
, dictionary helpers, etc). -
Misc: Contains a bunch of helpers + extensions for working with RN across swift/objc/c++, and has a dependency to
DGSwiftUtilities
for more helpers + utilities written in swift.
Development and maintenance of this library was generously sponsored by beatgig from 11/15/2023
to 04/30/2024
at $1,535
/month (totaling ≈ $9,100
over the course of 6 months) 🥁🎸
The initial fabric rewrite (i.e. version 5.x
) was made possible through a generous $3,750
sponsorship by natew + tamagui over the course of 4 months (from: 05/27/24
to 09/30/24
) 🐦✨
very special thanks to: junzhengca, brentvatne, expo, EvanBacon, corasan, lauridskern, and ronintechnologies for becoming a monthly sponsor, and thank you fobos531 for being a one time sponsor 🥺 (if you have the means to do so, please considering sponsoring here)
Thank you for contributing to this library: SamuelScheit (pr-#6
) 💫
npm install react-native-ios-utilities@next
cd ios && pod install
Library Version | Child Libraries / Dependents |
---|---|
react-native-ios-utilities Version: 4.3.x |
react-native-ios-context-menu Version: 2.4.x react-native-text-input-wrapper Version: 0.1.x react-native-ios-adaptive-modal Version: 0.6.x |
react-native-ios-utilities Version: 4.4.x |
react-native-ios-context-menu Version: 2.5.x react-native-text-input-wrapper Version: 0.1.x react-native-ios-adaptive-modal Version: 0.7.x |
react-native-ios-utilities Version: 5.x |
react-native-ios-context-menu Version: 3.x react-native-ios-visual-effect-view Version: 0.x |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT