Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imwildcat/reactnative-binary
https://github.com/imwildcat/reactnative-binary
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/imwildcat/reactnative-binary
- Owner: imWildCat
- Created: 2022-06-17T13:16:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T17:44:59.000Z (7 months ago)
- Last Synced: 2024-10-26T07:33:45.571Z (18 days ago)
- Language: Shell
- Size: 548 KB
- Stars: 33
- Watchers: 3
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ReactNative-Binary
Pre-built React Native xcframeworks to save the time of humans.
Features:
- iOS and Mac Catalyst are both supported with xcframeworks.
- About 1 minute (on M1) is saved for clean build (each CPU/platform target).
- Easy integration without messy Podfile.Inspired by .
## Project State
Thanks for your interesting of opening this web page.
I'll be resuming the development of this project soon, probably in a couple of hours.## Get Started
### Installation
#### CocoaPods
```rb
pod 'ReactNative-Binary', configuration: 'Release'
pod 'ReactNative-Binary-Debug', configuration: 'Debug' # loading debug support
```#### Swift Package
(working in progress)
### Code Snippet
Full example can be found at the [example](https://github.com/imWildCat/ReactNative-Binary/tree/main/example) folder.
```swift
import React
import UIKitpublic class ReactNativeBaseVC: UIViewController {
private enum Constants {
static let moduleName = "[ModuleName]"
}private lazy var rootView: UIView = RCTAppSetupDefaultRootView(self.bridge, Constants.moduleName, [:])
private lazy var bridge = RCTBridge(delegate: self, launchOptions: [:])public init() {
super.init(nibName: nil, bundle: nil)
}override public func viewDidLoad() {
super.viewDidLoad()rootView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(rootView)NSLayoutConstraint.activate([
rootView.topAnchor.constraint(equalTo: view.topAnchor),
rootView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
rootView.leftAnchor.constraint(equalTo: view.leftAnchor),
rootView.rightAnchor.constraint(equalTo: view.rightAnchor),
])
}
}extension ReactNativeBaseVC: RCTBridgeDelegate {
public func sourceURL(for _: RCTBridge!) -> URL! {
URL(string: "http://localhost:8081/index.bundle?platform=ios")! // or your local JavaScript bundle file
}public func extraModules(for _: RCTBridge!) -> [RCTBridgeModule]! {
[
RCTDevSettings(),
RCTAsyncLocalStorage(),
RCTRedBox(),
]
}
}```
([example/Targets/ReactNativeBinaryExampleUI/Sources/MainViewController.swift](example/Targets/ReactNativeBinaryExampleUI/Sources/MainViewController.swift))## Development
## Release Plan
We're using release branches `releases/[react_native_version]` to track the official release of React Native.
(working in progress)
## License
MIT