Suggestions

close search

stringee-react-native-chat

Getting started

$ npm install stringee-react-native-chat --save

Installation

iOS

Note Please make sure to have CocoaPods on your computer.

  1. In you terminal, change into your ios directory.

  2. Create a pod file by running: pod init.

  3. 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-chat/ios"
    end

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        if target.name == "React"
          target.remove_from_project
        end
      end
    end
  1. Now run, pod install

  2. Open XCode

  3. Open <YourProjectName>.xcworkspace file in XCode. This file can be found in the ios folder of your React Native project.

  4. In the "Build Settings" tab -> "Other linker flags" add "$(inherited)" flag.

  5. In the "Build Settings" tab -> "Enable bitcode" select "NO".

  6. Right-click the information property list file (Info.plist) and select Open As -> Source Code.

  7. 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

  1. Permissions

    The Stringee Android SDK requires some permissions from your app's AndroidManifest.xml file:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  2. ProGuard

    Open up android/app/proguard-rules.pro and add following lines:

    -dontwarn org.apache.**
    -keep class com.stringee.** { *; }
    -keep class org.apache.** { *; }