How can I record the audio with Ionic 2 in ios

I am going to create the recording audio with Ionic 2 in ios.
So I used to reference this:
Create an audio recorder app using Ionic 2

But I can’t record any audio in ios.
I used the cordova-plugin-media in the app.
How can I record the audio with Ionic 2?

What errors are you getting? Have you contacted the blog’s author? What is your environment that you are developing with?

I have developed the app in macOS.
When I click the Recording button, it display that message " Would Like to Access the Microphone.".

And I got following errors.
ERROR: Unhandled Promise rejection: [object Object] ; Zone:;Task: ;Value:[object Object]
ERROR: error JSON.stringify()ing argument: TypeError: JSON.stringify cannot serialize cyclic structures.

I think you need to install this plugin to check the then ask for the permission from the device

ionic plugin add cordova.plugins.diagnostic

check the doc from here