1.0.3 • Published 7 years ago
react-native-paint-board-library-obj-c v1.0.3
react-native-paint-board-library-obj-c
Getting started
$ npm install react-native-paint-board-library-obj-c --save
Mostly automatic installation
$ react-native link react-native-paint-board-library-obj-c
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-paint-board-library-obj-cand addRNPaintBoardLibraryObjC.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNPaintBoardLibraryObjC.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.RNPaintBoardLibraryObjCPackage;to the imports at the top of the file - Add
new RNPaintBoardLibraryObjCPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-paint-board-library-obj-c' project(':react-native-paint-board-library-obj-c').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-paint-board-library-obj-c/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-paint-board-library-obj-c')
Windows
- In Visual Studio add the
RNPaintBoardLibraryObjC.slninnode_modules/react-native-paint-board-library-obj-c/windows/RNPaintBoardLibraryObjC.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Paint.Board.Library.Obj.C.RNPaintBoardLibraryObjC;to the usings at the top of the file - Add
new RNPaintBoardLibraryObjCPackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import RNPaintBoardLibraryObjC from 'react-native-paint-board-library-obj-c';
// TODO: What to do with the module?
RNPaintBoardLibraryObjC;