Skip to content

React Native ssl pinning and cookies handling based on okhttp3 on (Android). and AFNetworking on (iOS)

Notifications You must be signed in to change notification settings

sandy105/react-native-ssl-pinning

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-ssl-pinning

React-Native Ssl pinning using OkHttp 3 in Android, and AFNetworking on iOS.

Getting started

$ npm install react-native-ssl-pinning --save

Mostly automatic installation

$ react-native link react-native-ssl-pinning

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-ssl-pinning and add RNSslPinning.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNSslPinning.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.toyberman.RNSslPinningPackage; to the imports at the top of the file
  • Add new RNSslPinningPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-ssl-