Whis version use CallKit instead of CTCallCenter. It works on IOS 13.
$ npm install react-native-check-phone-call-status --save
$ react-native link react-native-check-phone-call-status
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-check-phone-call-status
and addRNCheckPhoneCallStatus.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNCheckPhoneCallStatus.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Will return 'PHONE_ON' when phone is in use, and 'PHONE_OFF' when not in use.
import RNCheckPhoneCallStatus from 'react-native-check-phone-call-status';
RNCheckPhoneCallStatus.get((error, status) => {
console.log('Phone status is:', status);
});