Package Exports
- react-native-is-muted
- react-native-is-muted/lib/commonjs/index.js
- react-native-is-muted/lib/module/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-is-muted) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-is-muted

Detect the silent switch state in iOS.
Installation
Install the library from
npmnpm install react-native-is-muted
Link native code React native 0.60+ (IOS only)
cd ios && pod install # for iOS
pre 0.60
react-native link react-native-is-muted(IOS only) Add MuteChecker.caf to buildpase "Copy Bundle Resources"
- Open your project in XCode
- Click on project name > Target > Build Phases > Copy Bundle Resources
- Click on the + icon
- Click on Add another...

- Add MuteChecker.caf, located in nodemodules/react-native-is-muted/ios/

Done
Usage
Promise
import IsMuted from 'react-native-is-muted';
IsMuted()
.then(muted => {
console.log('Muted:', muted);
})
.catch(error => {
console.error(error);
});Async await
import IsMuted from 'react-native-is-muted';
try {
const muted = await IsMuted();
console.log('Muted: ', muted);
} catch (error) {
console.error(error);
}