Search code examples
nativescript

Is localforage working with nativescript preview app on IOS?


while using localforage for storing data for an app, I got an error while initializing the localforage.

Error: No available storage method found.

I tried to setup it with

localforage.INDEXEDDB
localforage.WEBSQL
localforage.LOCALSTORAGE

but the bug stays. I use the nativescript preview app on an iphone. May the preview app have the rights to store data on an iphone?

Regards Juergen


Solution

  • preview only works with certain pre-set packages as it is not able to build. try connecting a device to your machine and using the run command

    <= NativeScript 6

    tns run ios

    tns run android

    NativeScript 7

    ns run ios

    ns run android