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