Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined data in iOS when trying to store data #145

Open
sts-ryan-holton opened this issue Sep 23, 2019 · 0 comments
Open

Undefined data in iOS when trying to store data #145

sts-ryan-holton opened this issue Sep 23, 2019 · 0 comments

Comments

@sts-ryan-holton
Copy link

I've installed the latest version of this plugin into my Cordova / Nuxt JS project. I'm trying to store some data when I click a button, and alert the data back when a different button is clicked:

<template>
  <div class="fill-height has-safe-area-top">
    <v-container>
      <v-layout row pb-2>
        <v-flex>
          <h1>Native storage test</h1>
          <v-btn @click="storeData">Store</v-btn>
          <v-btn @click="getData">Get</v-btn>
        </v-flex>
      </v-layout>
    </v-container>
  </div>
</template>

<script>
export default {
  methods: {

    storeData() {
      NativeStorage.initWithSuiteName("suitename");
      NativeStorage.setItem("reference_to_value", "my value");
    },

    getData() {
      alert(NativeStorage.getItem("reference_to_value"))
    }

  }
}
</script>

This seems to return undefined on the alert() when testing on a physical device compiled in Xcode 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant