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: about 1 year 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-13T07:01:21.000Z (almost 7 years ago)
- Last Synced: 2025-03-18T13:12:53.438Z (over 1 year ago)
- Topics: ios, react-native
- Language: Ruby
- Size: 6.84 KB
- Stars: 4
- Watchers: 3
- 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)).