react-native-cookies icon indicating copy to clipboard operation
react-native-cookies copied to clipboard

Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project

Open fernsheldon opened this issue 8 years ago • 21 comments

So I did the following:

  • npm install react-native-cookies
  • rnpm link react-native-cookies

Alls good here, no errors. Then I added the following line to my index file:

import CookieManager from 'react-native-cookies';

and restarted my simulator... that's where I get this error

"Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project"

It works fine, when the simulator is started from Xcode.

fernsheldon avatar Jul 06 '16 13:07 fernsheldon

shahen94 avatar Jul 15 '16 08:07 shahen94

+1

cbcye avatar Aug 15 '16 09:08 cbcye

fix is issure, my problem is react-native-webview-bridge component has bug, make the build issure for this component, then uninstall bridge component is working.

cbcye avatar Aug 15 '16 09:08 cbcye

+1

loveninteb avatar Aug 18 '16 09:08 loveninteb

+1

himanshusoni avatar Aug 23 '16 22:08 himanshusoni

Guys, I resolved this issue by doing the following steps mentioned react-native-linking-libraries,

  1. Open the xcode project, at <Project_Name>/ios/<Project_Name>.xcodeproject
  2. Go to Project settings -> Build Settings -> Search Paths -> Header Search Paths (highlighted as 4. in the image at the bottom of the document page mentioned above)
  3. Look for RNCookieManagerIOS and make it as recursive

himanshusoni avatar Aug 26 '16 21:08 himanshusoni

Thank you @himanshusoni !! 👍

adrianotadao avatar Oct 21 '16 18:10 adrianotadao

@himanshusoni Unfortunately, your solution not working for me... Help me please!

valerybodak avatar Mar 15 '17 11:03 valerybodak

@himanshusoni the solution isn't working for me either - I tried manually linking it and also linking it automatically by the instructions here with no luck on either fronts. (Also changed RNCookieManagerIOS to recursive)

RohanVB avatar Jul 26 '17 18:07 RohanVB

I had the same problem. I think it may have be related to having XCode or the simulator open when you install the package.

I rolled back the updates and closed both the simulator and XCode, and then reinstalled and linked the package using "yarn add react-native-cookies" and "react-native link react-native-cookies", respectively, then restarted both XCode and the simulator up again, and it works now. Don't know if that will resolve the issue for everyone, but hopefully that helps somebody.

Oh, and if you do end up rolling back and reinstalling, make sure you reset and restart the packager, otherwise nothing will change.

thejacobseely avatar Sep 12 '17 17:09 thejacobseely

I got the same red screen, the thing is, I'm building a RN project with expo,no XCode project or simulator was used.

duhufu1987 avatar Oct 15 '17 14:10 duhufu1987

@duhufu1987 Did you solve it? @thejacobseely did not fix my issue, too bad.

natterstefan avatar Oct 31 '17 08:10 natterstefan

@natterstefan No, I've turned to use Asyncstorage for my project, which works.

duhufu1987 avatar Oct 31 '17 08:10 duhufu1987

@duhufu1987 okay, too bad. I need it to set&update cookies in a webview in the app. Do you maybe have a hint for me?

natterstefan avatar Oct 31 '17 09:10 natterstefan

@natterstefan sorry, I've no idea

duhufu1987 avatar Oct 31 '17 09:10 duhufu1987

Still getting this error when running react-native run-ios but like @fernsheldon said, running from xcode works fine.

karltaylor avatar Dec 15 '17 15:12 karltaylor

Same error for me also. When i tried to run from the command line "react-native run-ios" it does not working, but it working when trying with xcode.

nihp avatar May 04 '18 10:05 nihp

@fernsheldon any solution?

ManigandanRaamanathan avatar Apr 18 '19 14:04 ManigandanRaamanathan

Follow the steps

1. Remove the node_modules
2. npm install
3. Run react-native link
4. Install the app again

(also)

Check your project Xcode Libraries. If it not there in the Link binaries section add it manually and try to re-install the app.

Steps:

1. Click on the libraries in the Left of the Xcode ==> Add files to your project
2. Add the RNCookieManager.xcodeproj
3. Then go to general Tab of your target and add libRNCookieManagerIOS.a and libRNCookieManager.a

Then check whether it is present in build phases tab and re-run your app.

nihp avatar Apr 22 '19 07:04 nihp

Hi I have faced same issue? What will be solution for this issue?

pegasus1982 avatar Sep 30 '19 21:09 pegasus1982

@pegasus1982 Did you tried this

https://github.com/joeferraro/react-native-cookies/issues/34#issuecomment-485350720

What are the solutions you have tried

nihp avatar Oct 01 '19 05:10 nihp