0
votes

I stuck for days trying to make it work “open-native-settings” on my ionic 3 project,.

So, following the documentation, https://ionicframework.com/docs/native/open-native-settings

add this on app.modules.ts:

import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';

and add OpenNativeSettings in providers list.

Then en my .ts file:

import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx';

Adding on constructor:

constructor(private openNativeSettings: OpenNativeSettings) { }

but when trying call open() method I get:

(…) is not a function. (???)

this plugin work fine on Ionic 3??

I need try this on Ionic 3, not Ionic 4.

I know that /ngx is for Ionic 4. Then, I trying the normal method:

import { OpenNativeSettings } from ‘@ionic-native/open-native-settings’;

But doing this, I get this errors on the editor:

Error on source app.modules.ts

Error on source .ts file

any suggestions??

Thanks.

1

1 Answers

-1
votes

Have a look at this thread:

https://forum.ionicframework.com/t/ionic-native-issue-in-ionic-app/154152/19

I think the short answer is that to get this working in Ionic 3, you need to install the native plugin with the @4 version appended. Then import without the /ngx. But when working in Ionic 4, you need to do what you've done above. The only caveat is that you need to be consistent across all the native modules you use.