Audio and video stream error on iPhone in a react-native app developed using lib-jitsi-meet

I am working on react-native implementation of jitsi meet using lib-jitsi-meet. The app working perfectly on android but on ios i get an error when i connect to a room. the error is as follows:

[modules/RTC/RTCUtils.js] <>: failed to obtain audio stream - stop
a {gum: {…}, name: “gum.general”, message: “Generic getUserMedia error”, stack: “Error↵ at new a (blob:http://localhost:8081/ff1…ocalhost:8081/debugger-ui/debuggerWorker.js:80:58”}
constraints: {audio: true, video: false}
devices: [“audio”]
error: DOMException
code: 20
message: “”
name: “AbortError”
proto: DOMException
proto: Object
message: “Generic getUserMedia error”
name: “gum.general”

This error is related to this piece of code:
JitsiMeet.createLocalTracks({ devices: [‘audio’,‘video’], facingMode: ‘user’})
.catch(error => {
throw error;