Git Product home page Git Product logo

react-native-chat-room-demo's Introduction

跑通示例项目

该项目依赖 AppServer 服务器端项目,具体参考相应文档。 客户端编译运行参考下面的说明。

环境需求

使用该项目的要求:

  • MacOS 12 或以上版本
  • React-Native 0.66 或以上版本
  • NodeJs 16.18 或以上版本

对于 iOS 应用:

  • Xcode 13 或以上版本,以及它的相关依赖工具。

对于 Android 应用:

  • Android Studio 2021 或以上版本,以及它的相关依赖工具。

账号准备

应用的创建和账号创建请到这里:控制台

下载项目

下载地址

初始化配置

下载完成之后,打开项目的子目录 rn

cd rn

运行 yarn 初始化项目

yarn

生成配置文件

yarn run env

运行完成生成配置文件 src/env.ts.

文件内容如下:

export const isDevMode = true;
export const appKey = '';
export const accountType = 'easemob'; // agora or easemob
export const agoraAppId = '';
export const gAvatarUrlBasic = '';
export const gRegisterUserUrl = '';
export const gCreateRoomUrl = '';
export const gGetRoomListUrl = '';
export const account = [{ id: '', token: '' }];

填写必要参数

在生成的项目中必须填写 appKey accountType。 其中,gAvatarUrlBasic gRegisterUserUrl gGetRoomListUrl gCreateRoomUrl 这些参数来自 AppServer 服务器配置。

account 为默认界面默认使用的账号。

编译和运行项目

运行 ios 平台:

yarn run ios

运行 android 平台

yarn run android

react-native-chat-room-demo's People

Contributors

asteriskzuo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.