stringee-test-react-native v1.0.10
stringee-react-native
Getting started
$ npm install stringee-react-native --save
Installation
iOS
Note Please make sure to have CocoaPods on your computer.
1. In you terminal, change into your ios directory.
Create a pod file by running:
pod init.Add the following to your pod file:
platform :ios, '8.0'
target '<YourProjectName>' do
node_modules_path = '../node_modules'
pod 'yoga', path: "#{node_modules_path}/react-native/ReactCommon/yoga/yoga.podspec"
pod 'React', path: "#{node_modules_path}/react-native", :subspecs => ['DevSupport', 'RCTNetwork']
pod 'RNStringee', path: "#{node_modules_path}/stringee-react-native/ios"
endNow run,
pod installOpen XCode
Open
<YourProjectName>.xcworkspacefile in XCode. This file can be found in theiosfolder of your React Native project.In the "Build Settings" tab -> "Other linker flags" add "$(inherited)" flag.
In the "Build Settings" tab -> "Enable bitcode" select "NO".
Right-click the information property list file (Info.plist) and select Open As -> Source Code.
Insert the following XML snippet into the body of your file just before the final element:
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) uses Camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) uses Microphone</string>Android
Automatic installation
$ react-native link stringee-react-native
Manual installation
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.stringeereactnative.RNStringeeReactPackage;to the imports at the top of the file - Add
new RNStringeePackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':stringee-react-native' project(':stringee-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/stringee-react-native/android') Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':stringee-react-native')