1 | # expo-sensors-interface
|
2 |
|
3 | An interface for expo-sensors.
|
4 |
|
5 | # Installation
|
6 |
|
7 | This package is pre-installed in [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects. You may skip the rest of the installation guide if this applies to you.
|
8 |
|
9 | For bare React Native projects, you must ensure that you have [installed and configured the `@unimodules/core` package](https://github.com/unimodules/core) before continuing.
|
10 |
|
11 | ### Add the package to your npm dependencies
|
12 |
|
13 | ```
|
14 | npm install expo-sensors-interface
|
15 | ```
|
16 |
|
17 | ### Configure for iOS
|
18 |
|
19 | Add the dependency to your `Podfile` and then run `pod install`.
|
20 |
|
21 | ```ruby
|
22 | pod 'EXSensorsInterface', path: '../node_modules/expo-sensors-interface/ios'
|
23 | ```
|
24 |
|
25 | ### Configure for Android
|
26 |
|
27 | 1. Append the following lines to `android/settings.gradle`:
|
28 |
|
29 | ```gradle
|
30 | include ':expo-sensors-interface'
|
31 | project(':expo-sensors-interface').projectDir = new File(rootProject.projectDir, '../node_modules/expo-sensors-interface/android')
|
32 | ```
|
33 |
|
34 | 2. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
|
35 | ```gradle
|
36 | api project(':expo-sensors-interface')
|
37 | ```
|
38 |
|
39 | # Contributing
|
40 |
|
41 | Contributions are very welcome! Please refer to guidelines described in the [contributing guide]( https://github.com/expo/expo#contributing).
|