Can't find variable: NativeStorage

Hello everyone!

I’m dealing with the next error using cordova-plugin-nativestorage.

Error: Can’t find variable: NativeStorage

When i start my app (the first launch with splashscreen), a service that use that plugin to get data is fired, because i have a $ionicView.enter calling this service.
But seems that plugin is not loaded.
After the first loading everything work well.
Only happen on ios. Debugging I saw that iOS and Android loads js files in different order.
Anyone can give me some hints on that?

Thanks :slight_smile:

did you wrap your call of the native storage plugin in $ionicPlatform.ready?

because you have to be sure, that cordova and the pluginsystem are ready.



Thanks, i fix the problem wrapping the call as you said.