1.0.0 • Published 8 years ago
react-native-test-to-create-lib v1.0.0
react-native-test-to-create-lib
Getting started
$ npm install react-native-test-to-create-lib --save
Mostly automatic installation
$ react-native link react-native-test-to-create-lib
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-test-to-create-liband addRNTestToCreateLib.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNTestToCreateLib.ato 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.RNTestToCreateLibPackage;to the imports at the top of the file - Add
new RNTestToCreateLibPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-test-to-create-lib' project(':react-native-test-to-create-lib').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-test-to-create-lib/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-test-to-create-lib')
Windows
- In Visual Studio add the
RNTestToCreateLib.slninnode_modules/react-native-test-to-create-lib/windows/RNTestToCreateLib.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Test.To.Create.Lib.RNTestToCreateLib;to the usings at the top of the file - Add
new RNTestToCreateLibPackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import RNTestToCreateLib from 'react-native-test-to-create-lib';
// TODO: What to do with the module?
RNTestToCreateLib;1.0.0
8 years ago