xiaoyaosheng666 / react-native-agora

React Native around the Agora RTC SDKs for Android and iOS agora

Home Page:https://www.agora.io/cn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-agora

npm npm npm npm

中文

This SDK takes advantage of React Native and Agora RTC Video SDK on Android && iOS.

Community Contributor

The community developer Syanbo developed 1.0 version React Native SDK based on the Agora Native SDK from 2016 to 2017. As the community's demand for React Native SDK keeps growing, Agora has achieved official cooperation with Syanbo, this project now is officially maintained by Agora. Thanks to Syanbo for his long-term contributions to React Native SDK.

Release Note

Changelog

Installation

Installing (React Native >= 0.60.0)

Install react-native-agora(^3.0.0):

yarn add react-native-agora

or

npm i --save react-native-agora

Go to your ios folder and run:

pod install

_ IMPORTANT _

Native Modules are now Autolinked.

Migrating to Swift.

Installing (React Native == 0.59.x)

Install react-native-agora(^3.0.0):

yarn add react-native-agora

or

npm i --save react-native-agora

_ IMPORTANT _

Android Installation

iOS Installation

Installing (React Native <= 0.58.x)

_ IMPORTANT _

We no longer support, you can try the older version.

Install react-native-agora(^1.0.0)

Install react-native-agora(^2.0.0)

General Usage

import RtcEngine from 'react-native-agora';
RtcEngine.create('YOUR APP ID');

or

const RtcEngine = require('react-native-agora');
RtcEngine.create('YOUR APP ID');

Using TypeScript

We suggest you use TypeScript to develop, or use TypeScript eslint to lint your code.

Troubleshooting

Pod install failed (React Native >= 0.62.0)

The error log:

[!] The 'xxx' target has libraries with conflicting names: libcrypto.a.

You should disable Flipper, you can found it in the Podfile, and comment the code about Flipper in AppDelegate.

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  add_flipper_pods!
  post_install do |installer|
    flipper_post_install(installer)
  end

RCT_EXTERN_MODULE Swift modules broken in Xcode 10.2

The error log:

Swift class extensions and categories on Swift classes are not allowed to have +load methods

Fixed in React Native 0.59.3.

Source: facebook/react-native#24139

XCode 11 Beta App Launch Crash

The error log:

Exception '*** -[__NSArrayM objectAtIndexedSubscript:]: index 1 beyond bounds [0 .. 0]' was thrown while invoking getCurrentAppState on target AppState with params (
2,
3
)

Fixed in React Native 0.59.9.

Source: facebook/react-native#25154

API

Resources

License

Copyright (c) 2020 syanbo luxuhui

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

React Native around the Agora RTC SDKs for Android and iOS agora

https://www.agora.io/cn/

License:MIT License


Languages

Language:TypeScript 56.8%Language:Kotlin 19.2%Language:Swift 18.5%Language:Java 4.4%Language:Objective-C 0.8%Language:Shell 0.2%Language:Ruby 0.1%