Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inkdropapp/react-native-main-bundle-path
Get main bundle path on React Native
https://github.com/inkdropapp/react-native-main-bundle-path
ios react-native
Last synced: 20 days ago
JSON representation
Get main bundle path on React Native
- Host: GitHub
- URL: https://github.com/inkdropapp/react-native-main-bundle-path
- Owner: inkdropapp
- License: mit
- Created: 2019-09-12T08:05:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-13T07:01:21.000Z (over 5 years ago)
- Last Synced: 2024-11-13T02:49:44.160Z (about 1 month ago)
- Topics: ios, react-native
- Language: Ruby
- Size: 6.84 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-main-bundle-path
It allows you to get the main bundle path on iOS without requiring [react-native-fs](https://github.com/itinance/react-native-fs).
It would come in handy when you would like to load a bundled html file on WebView.## Getting started
```shell
$ npm install react-native-main-bundle-path --save
```### Mostly automatic installation
```shell
$ react-native link react-native-main-bundle-path
```## Usage
Using `Promise`:
```javascript
import MainBundlePath from 'react-native-main-bundle-path'MainBundlePath.get().then(path => {
console.log('main bundle path:', path)
})
````Reference`:
```javascript
import MainBundlePath from 'react-native-main-bundle-path'In your react component:
{MainBundlePath.bundlePath}
```## License
MIT License. By Takuya Matsuyama ([@craftzdog](https://twitter.com/craftzdog)).