react-native-cookie
react-native-cookie copied to clipboard
Cannot read property 'setCookie' of undefined
I get this Unhandled JS Exception: Cannot read property 'setCookie' of undefined after upgrading to "react-native": "0.51.0", "react-native-cookie": "^0.2.0",

- Close simulator
- link by: "react-native link react-native-cookie"
- run your app and the error should be gone!
my build fails after doing "react-native link react-native-cookie", had to unlink to build successfully.
Any insight?
@kevin074 Please share the error log from console so that I can help you to figure out the solution.
I am getting a similar error. Below are the error log
** BUILD FAILED **
The following build commands failed: ProcessInfoPlistFile /Users/ipv/workspace/cookieTestApp/ios/build/Build/Products/Debug-iphonesimulator/RNCookieManagerTests.xctest/Info.plist RNCookieManagerTests/Info.plist (1 failure)
In our iOS project we are using different schemes. Linking the react-native-cookie project did only link the library for the main scheme so I had to add it to the orthers manually:
In Xcode, click on your project, select your target -> Build Phases-> link Binary With Libraries and add libRNCookieManager.a
That did the trick for us.