$ npm install react-native-midi-driver --save
$ react-native link react-native-midi-driver
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-midi-driverand addRNMidiDriver.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNMidiDriver.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNMidiDriverPackage;to the imports at the top of the file - Add
new RNMidiDriverPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-midi-driver' project(':react-native-midi-driver').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-midi-driver/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-midi-driver')
- In Visual Studio add the
RNMidiDriver.slninnode_modules/react-native-midi-driver/windows/RNMidiDriver.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Com.Reactlibrary.RNMidiDriver;to the usings at the top of the file - Add
new RNMidiDriverPackage()to theList<IReactPackage>returned by thePackagesmethod
import RNMidiDriver from 'react-native-midi-driver';
// TODO: What to do with the module?
RNMidiDriver;