EddyVerbruggen / nativescript-secure-storage

:closed_lock_with_key: NativeScript plugin for secure local storage of fi. passwords
MIT License
111 stars 26 forks source link

Can't find variable: SAMKeychain #3

Closed kenhowardpdx closed 7 years ago

kenhowardpdx commented 7 years ago

Full Error:

ReferenceError {message: "Can't find variable: SAMKeychain", line: 26, column: 24, sourceURL: "file:///app/tns_modules/nativescript-secure-storage/secure-storage.js", stack: "file:///app/tns_modules/nativescript-secure-storag…e]
[native code]
promiseReactionJob@[native code]"} (/Users/ken/Projects/kidsdo/app/shared/config.js:21:34)

After installing the plugin I ran tns build ios then tns livesync ios --emulator --watch. During boot I see this error:

CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): ReferenceError: Can't find variable: SAMKeychainQuery
kenhowardpdx commented 7 years ago

@Nathanaela's suggestion:

... I would guess the issue is that even though you rebuilt it; the version on the device is still the old version. De-install the app; then do a tns run ios --emulator (Don't add a watch or livesync to the command). Then once it builds it and installs a fresh copy; then you can do livesync/watch.

This fixed my issue. Closing.

EddyVerbruggen commented 7 years ago

Yeah common problem with plugins with external dependencies.. and that's indeed the best solution atm. Thank for sharing!