Native Dialogs not showing

I’m trying to use Native Dialogs in iOS app.

So, I have installed cordova and ionic plugins:

$ ionic cordova plugin add cordova-plugin-dialogs
$ npm install @ionic-native/dialogs

I have imported one to app.module.ts:

providers: [

I have declared it inside page.ts:

import { Dialogs } from '@ionic-native/dialogs/ngx';

        private dialogs: Dialogs,
) { }

Then I’m trying to call it:

this.dialogs.alert('Hello world')

And nothing happened. Dialog not appeared.
What is the problem?

Any Erros in Console?

Even, when I’m trying to call:

this.dialogs.alert('Hello world')
        .then(() => console.log('Dialog dismissed'))
        .catch(e => console.log('Error displaying dialog', e));

There is no any messages in console

you can try to debug the natice code in the xcode project

Have you read this?

1 Like

Thank you.

I have added:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' gap://ready file://* *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

And everything works fine