$ npm install react-native-audio-routes-events --save
$ react-native link react-native-audio-routes-events
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-audio-routes-events
and addRNAudioRoutesEvents.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNAudioRoutesEvents.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.reactlibrary.RNAudioRoutesEventsPackage;
to the imports at the top of the file - Add
new RNAudioRoutesEventsPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-audio-routes-events' project(':react-native-audio-routes-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-audio-routes-events/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-audio-routes-events')
- In Visual Studio add the
RNAudioRoutesEvents.sln
innode_modules/react-native-audio-routes-events/windows/RNAudioRoutesEvents.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Audio.Routes.Events.RNAudioRoutesEvents;
to the usings at the top of the file - Add
new RNAudioRoutesEventsPackage()
to theList<IReactPackage>
returned by thePackages
method
import RNAudioRoutesEvents from 'react-native-audio-routes-events';
// TODO: What to do with the module?
RNAudioRoutesEvents;