react-native-cook-trivia-helper
v1.0.1
Published
A ReactNative CookTriviaHelper Component for android and iOS
Downloads
4
Maintainers
Readme
react-native-cook-trivia-helper
Getting started
$ npm install react-native-cook-trivia-helper --save
Mostly automatic installation
$ react-native link react-native-cook-trivia-helper
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-cook-trivia-helper
and addRNCookTriviaHelper.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNCookTriviaHelper.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.RNCookTriviaHelperPackage;
to the imports at the top of the file - Add
new RNCookTriviaHelperPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-cook-trivia-helper' project(':react-native-cook-trivia-helper').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cook-trivia-helper/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-cook-trivia-helper')
Windows
- In Visual Studio add the
RNCookTriviaHelper.sln
innode_modules/react-native-cook-trivia-helper/windows/RNCookTriviaHelper.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Cook.Trivia.Helper.RNCookTriviaHelper;
to the usings at the top of the file - Add
new RNCookTriviaHelperPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNCookTriviaHelper from 'react-native-cook-trivia-helper';
// TODO: What to do with the module?
RNCookTriviaHelper;