
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
react-native-ios-volume
Advanced tools
A library that controls 'ios device' volume.
Physical Device 'Only'
$ npm install react-native-ios-volume --save
$ react-native link react-native-ios-volume
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-ios-volume
and add RNIosVolume.xcodeproj
libRNIosVolume.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<
import RNIosVolume from 'react-native-ios-volume';
import React, {Component} from 'react';
class VolumeTest extends Component {
constructor(props) {
super(props);
RNIosVolume.onVolumeChange = e=>{
console.log(`onChange===${e.volume}===`);
};
}
componentDidMount(){
console.log("testing start");
RNIosVolume.getVolume().then(e=>{
console.log(`onGet===${e}===`);
});
RNIosVolume.setVolume(1);
RNIosVolume.setVolume(0.2);
RNIosVolume.setVolume(0.5);
}
...
}
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 |
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 |
@pohsiu
@zxcal
FAQs
React Native Volume Control library for iOS
We found that react-native-ios-volume demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.