React Native ios Volume
A library that controls 'ios device' volume.
Physical Device 'Only'
react-native-ios-volume
Getting started
$ npm install react-native-ios-volume --save
Mostly automatic installation
$ react-native link react-native-ios-volume
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-ios-volume
and addRNIosVolume.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNIosVolume.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Usage
;; { superprops; RNIosVolume{ console; }; } { console; RNIosVolume; RNIosVolume; RNIosVolume; RNIosVolume; } ...
API
Static access to the RNIosVolume API.
Method Name | Description | Platform |
---|---|---|
RNIosVolume.getVolume() | Get a promise that return volume .2f float value | iOS |
RNIosVolume.setVolume() | Set a number to your device on volume | iOS |
Events
Callbacks that are invoked when a native event emitted.
Event Name | Description | Event | Platform |
---|---|---|---|
RNIosVolume.onChangeVolume(event) | Invoked when ios system volume is changed | event.volume |
iOS |
Contibutors
- @pohsiu
- @zxcal