Ionic 2 - IOS both: Native Media Plugin and crodova media plugin Not working

I am trying to record audio using the cordova media plugin, I followed few solutions about creating file before starting media and replacing the “file://” prefix. without success. The file is created but seems like media.create fails as the file stays 0Bytes

this.file.createFile(this.dir, this.filename, true).then(() => {
this.m =^file:///, ‘’) + this.filename);

this.dir has value of tempDirecotory

I have also tried to use the cordova media plugin directly without success it gives me error:
“failed to start recording using avaudiorecorder code 1”

Any guidance is appreciated.