question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your ios project

See original GitHub issue

Bug

Error “add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your ios project”

Screenshot 2020-02-28 at 8 22 03 PM

Environment info

react-native-community/cookies version: 2.0.3 React native info output:

System:
    OS: macOS 10.15.3
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 700.00 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
    Yarn: 1.22.0 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29
      Build Tools: 25.0.0, 27.0.3, 28.0.1, 28.0.3, 29.0.0, 29.0.3
      System Images: android-19 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-25 | Google Play Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom
      Android NDK: 17.2.4988734
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5

Library version: 2.0.3

react-native config already contains this package:

    "@react-native-community/cookies": {
      "root": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies",
      "name": "@react-native-community/cookies",
      "platforms": {
        "ios": {
          "sourceDir": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies/ios",
          "folder": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies",
          "pbxprojPath": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies/ios/RNCookieManagerIOS.xcodeproj/project.pbxproj",
          "podfile": null,
          "podspecPath": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies/ios/react-native-cookies.podspec",
          "projectPath": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies/ios/RNCookieManagerIOS.xcodeproj",
          "projectName": "RNCookieManagerIOS.xcodeproj",
          "libraryFolder": "Libraries",
          "sharedLibraries": [],
          "plist": [],
          "scriptPhases": []
        },
        "android": {
          "sourceDir": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies/android",
          "folder": "/Users/jay.shah/Documents/mypartner/node_modules/@react-native-community/cookies",
          "packageImportPath": "import com.reactnativecommunity.cookies.CookieManagerPackage;",
          "packageInstance": "new CookieManagerPackage()"
        }
      },
      "assets": [],
      "hooks": {},
      "params": []
    },

Steps To Reproduce

  1. npm install --save @react-native-community/cookies
  2. pod install
  3. run app from Xcode

Describe what you expected to happen:

  1. ios build to work but breaks with “add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your ios project”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
nareshbhatiacommented, Mar 9, 2020

I am getting the same error when running jest. I also added the ‘react-native-cookies’ line mentioned above to Podfile (and ran pod install), but that made no difference.

6reactions
dwesty17commented, May 4, 2021

Thanks for the help @luisaverza! I had to do it slightly differently just given some of the changes to the library…

jest.mock("@react-native-cookies/cookies", () => ({
  clearAll: jest.fn(),
}));

just incase anyone else stumbles across this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-cookies - Bountysource
Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project $ 0. Created 6 years ago in joeferraro/react-native-cookies with 21 comments ...
Read more >
Testing React Native app includes react-native-cookies with Jest
Testing React Native app includes react-native-cookies with Jest ... Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project ...
Read more >
React Native - Xcode 12.1 & iOS 14.0.1 Invariant Violation ...
Below are the errors while bundling iOS from Terminal -. Version - Xcode 12.1 & iOS ... Consider refactoring to remove the need...
Read more >
@react-native-community/cookies - npm
Start using @react-native-community/cookies in your project by running `npm i @react-native-community/cookies`. There are 7 other projects ...
Read more >
react-native-community/react-native-cookies - npm package
Snyk scans all the packages in your projects for vulnerabilities and provides automated fix ... and add RNCookieManagerIOS.xcodeproj .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found