Closed Lechevallier closed 7 years ago
Hello
It seems that you have edited the right files (for the iOS part).
The problem with logging in iOS is often solved by using the console plugin:
cordova plugin add cordova-plugin-console
Are the functions correclty invoked in JavaScript?
I build my project in the console (cordova build ios
) but I run the project with XCode, so I can directly see the logs.
I tried to use the XCode debugger but its a mess.
I'm sure that the program run into the function where I called
NativeStorage.addObserver(key, function (result) { ... }, function (e) { ... });
But then no alert are displayed, as this does:
NativeStorage.putInt(key, function (result) { ... }, function (e) { ... });
I fixed it, I was not editing the right file.
Instead of this one demo/plugins/cordova-plugin-nativestorage/www/mainHandle.js
edit this one demo/platforms/ios/www/plugins/cordova-plugin-nativestorage/www/mainHandle.js
, at least for testing.
Glad it worked!
Hi,
Thanks for this plugin, it's really usefull. I'm trying to implement the plugin to add an observer to some keys. I'm testing on the demo project, but it seems that my function is never called.
Which files should I edit when adding a new function? I'm editing files under the following location
demo/plugins/cordova-plugin-nativestorage
I added my function insrc/ios/NativeStorage.m
and its description insrc/ios/NativeStorage.h
.I also edited the file
www/mainHandle.js
by addingAnd finally the file
index.js
of courseAfter calling this function, I'm supposed to get an alert of confirmation (or error), but it never came out. I also placed some NSLog which are not printed. So my function is not called. Did I miss one file to edit?
Best regards