Recording audio ionic 2 on ios

I have created the ionic 2 application that can record the audio on ios.
I used the cordova plugin called MediaPlugin.
I created android app with ionic 2 before and it’s fine.
But ios app is awful.
I created the instance of the MediaPlugin using cordova.file.dataDirectory.
I got that file path: file:///var/mobile/Containers/Data/Application/ /Library/NoCloud/recording.wav
Recording function doesn’t work now.
How can I record the audio on ios?