Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
firofame authored Oct 30, 2019
1 parent 002cbdb commit aefb268
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
# react-native-compass-heading

## Getting started
## Installation

`$ npm install react-native-compass-heading --save`

### Mostly automatic installation

`$ react-native link react-native-compass-heading`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
2. Go to `node_modules``react-native-compass-heading` and add `CompassHeading.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libCompassHeading.a` to your project's `Build Phases``Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
- Add `import com.reactlibrary.CompassHeadingPackage;` to the imports at the top of the file
- Add `new CompassHeadingPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-compass-heading'
project(':react-native-compass-heading').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-compass-heading/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-compass-heading')
```
`$ yarn add react-native-compass-heading`

`$ cd ios/ && pod install && cd ..`

## Usage
```javascript
Expand Down

0 comments on commit aefb268

Please sign in to comment.