5.1.1-alpha.3 • Published 5 years ago

react-native-nend-sdk v5.1.1-alpha.3

Weekly downloads
5
License
COMMERCIAL
Repository
-
Last release
5 years ago

react-native-react-native-nend-sdk

Getting started

$ npm install react-native-react-native-nend-sdk --save

Mostly automatic installation (android only)

$ react-native link react-native-react-native-nend-sdk

Manual installation

iOS

Requires Cocoapods and iOS >= 9.0.

If you get linking errors about swift libraries add $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) to your library search paths ( file explorer -> under Targets select your target -> select the Build Settings tab -> search for Library Search Paths and add $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) to the debug and release sections.). Source.

Add the following to your podfile (create it in your ios folder) and run pod install:

...
use_modular_headers!
...
target ... do
...
  pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga'
  pod 'React', path: '../node_modules/react-native'
  pod 'react-native-nend-sdk', path: '../node_modules/react-native-nend-sdk'
...
end

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNReactNativeNendSdkPackage; to the imports at the top of the file
  • Add new RNReactNativeNendSdkPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-react-native-nend-sdk'
    project(':react-native-react-native-nend-sdk').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-react-native-nend-sdk/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-react-native-nend-sdk')

Usage

import ReactNativeNendSdk from 'react-native-react-native-nend-sdk';

// TODO: What to do with the module?