aerogear-react-native-core
v0.0.2
Published
Get your device's OS SDK version
Downloads
2
Readme
aerogear-react-native-core
Getting started
$ npm install aerogear-react-native-core --save
Mostly automatic installation
$ react-native link aerogear-react-native-core
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜aerogear-react-native-core
and addMobileCore.xcodeproj
- In XCode, in the project navigator, select your project. Add
libMobileCore.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.MobileCorePackage;
to the imports at the top of the file - Add
new MobileCorePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':aerogear-react-native-core' project(':aerogear-react-native-core').projectDir = new File(rootProject.projectDir, '../node_modules/aerogear-react-native-core/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':aerogear-react-native-core')
Usage
import MobileCore from 'aerogear-react-native-core';
const SDK = MobileCore.getDeviceMetrics();