Open WangHansen opened 3 years ago
@WangHansen Did you find a solution for this? I am experiencing the same issue on iOS, Android works fine.
if (error) {
resolve(@"fail");
} else {
resolve(@"started");
}
edit: https://github.com/yutasuzuki/react-native-record-screen/blob/cc2a2ed5f2ad7cfb845547d7d60c619d1dc170ec/src/index.tsx#L3
to
export declare type RecordingStartResponse = 'started' | 'fail';
edit:
import RecordScreen from 'react-native-record-screen';
// recording start
const res = await RecordScreen.startRecording().catch((error) => console.error(error));
if (res=="fail") {
//do something after user denied the access
}
It seems that the granted value will always be true here: https://github.com/yutasuzuki/react-native-record-screen/blob/cc2a2ed5f2ad7cfb845547d7d60c619d1dc170ec/ios/RecordScreen.m#L124
But if I denied the access, the error will be captured in here: https://github.com/yutasuzuki/react-native-record-screen/blob/cc2a2ed5f2ad7cfb845547d7d60c619d1dc170ec/ios/RecordScreen.m#L168