react-native-userdefaults-ios
react-native-userdefaults-ios copied to clipboard
undefined is not an object (evaluating 'UserDefaults.setObjectForKey')
On line 7 of RNUserDefaultsIOS.js, var _setObjectForKey = Promise.promisify(UserDefaults.setObjectForKey);
it seems UserDefaults was not set because there is no RNUserDefaultsIOS inside NativeModules. (line 5).
I followed the installation README very closely I don't think it did anything wrong. Any ideas? Thanks!
Thanks for reporting this. What version of RN are you using?
Hi Dave,
I'm using react-native 0.23.1. Thanks!
-Kenji On Apr 21, 2016 2:36 PM, "Dave Sibiski" [email protected] wrote:
Thanks for reporting this. What version of RN are you using?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/dsibiski/react-native-userdefaults-ios/issues/10#issuecomment-213122697
I'm getting the same issue using RN 0.41.1 and the latest version of react-native-userdefaults-ios. Seems to have issues linking correctly. I am using CocoaPods and an .xcworkspace if that makes any difference in how it links.
Thanks in advance for any help.
same issue in RN 0.43
In case anyone is still getting this issue, it looks like a typo in the README. In step 4, add Products/libRNUserDefaultsIOS.a to the libraries of your project, not RNUserDefaults.xcodproj.