RaphaelWoude / capacitor-native-settings

Capacitor plugin to open native settings screens for android and iOS
MIT License
95 stars 30 forks source link

Android/iOS Settings are not imported #29

Closed aleksandar-brkic closed 2 years ago

aleksandar-brkic commented 2 years ago

Both AndroidSettings and IOSSettings need to be imported in order for the example in the docs to work. If they are not, the error is that they are not defined. image

So this is what worked for me:

import {NativeSettings, AndroidSettings, IOSSettings} from 'capacitor-native-settings'

export default {
  methods: {
    onInput(value) {
      NativeSettings.open({
        optionAndroid: AndroidSettings.AppNotification,
        optionIOS:     IOSSettings.App,
      })
      ...
RaphaelWoude commented 2 years ago

Will update the README tonight.