react-native-browser
A full-featured web browser module for React Native apps, based on the awesome TOWebViewController
Installation
- Run
npm install react-native-browser --save
in your project directory.
- Open your project in XCode, right click on
Libraries
and clickAdd Files to "Your Project Name"
- Inside your node_modules, find react-native-browser and add
RCTBrowser.xcodeproj
to your project. - Add
libRTCBrowser.a
toBuild Phases -> Link Binary With Libraries
- Whenever you want to use it within your React code, you can:
var Browser = require('react-native-browser');
Usage
Example:
; // at the top of your file near the other importsvar Browser = ; ... // wherever you want to trigger a browser modal appearingBrowser; // OR pass in options to customizeBrowser;
Descriptions of options and their defaults
TODOs
- Finish adding all customization options / support callbacks
- Accessors for webview & url requests
- Programatic control of loading pages, closing the view, etc