React Native ~ Linking React Native Cookies - rohit120582sharma/Documentation GitHub Wiki

Installation

npm install react-native-cookies --save

References



Linking

Automatic

react-native link react-native-cookies

iOS Manually

  • Open your project in Xcode, right click on Libraries and click Add Files to "Your Project Name" Look under node_modules/react-native-cookies/ios and add RNCookieManagerIOS.xcodeproj

  • Add libRNCookieManagerIOS.a to Build Phases -> Link Binary With Libraries

  • Clean and rebuild your project


Android Manually

  • android/settings.gradle

    include ':react-native-cookies'
    project(':react-native-cookies').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cookies/android')
    
  • android/app/build.gradle

     dependencies {
     	...
     	compile project(':react-native-cookies')
     }
    
  • MainApplication.java

     import com.psykar.cookiemanager.CookieManagerPackage;
    
     @Override
     protected List<ReactPackage> getPackages() {
     	return Arrays.asList(
     		new MainReactPackage(),
     		new CookieManagerPackage()
     	);
     }
    


⚠️ **GitHub.com Fallback** ⚠️