Update time: 2022-06-16
Audience: code contributors, test contributors, problem finders, interested learners, etc.
Recommendation: macOS 10.15.7 or above. If it is an arm64 chip mac, it is recommended to keep the latest system.
JAVA_HOME ANDROID_HOME
# if bash, open ~/.bashrc
# if zsh, open ~/.zshrc
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
export ANDROID_HOME="/Users/${foo}/Library/Android/sdk"
macos10.15.7 can only install xcode up to version 12.4. If it is an arm64 chip mac, it is recommended to keep the latest version. Please install the command line tool that matches xcode: xcode-select, if it is the first installation, you may need to activate it.
xcode-select --install
android studio recommends using 2020.3.1patch4 or above. If it is a mac with an arm64 chip, it is recommended to install the arm version. It is recommended to run it after the installation is complete, and it is recommended to run the project to ensure that all required dependencies are downloaded. download address
visual studio code recommends installing and keeping the latest version. Required plugin: react-native-tool. By Microsoft. download address
It is recommended to install or update to the latest version. install instructor
The git version that comes with the mac system is relatively old. It is recommended to use brew to upgrade to the latest, or the official dmg installation. Please configure ssh information, because ssh is used for management in sub-projects.
brew install git
Java recommends installing java8 (alias 1.8) or above If it is an arm64 chip mac, it is recommended to install the arm64 version. You can also use the JDK that comes with android studio. download address
It is recommended to use the official download package to install, or use brew to install. NodeJs recommends version 16 (Long Term Support version) or above. download address
brew install node
Cocoapods recommends using brew to install the latest version or upgrade to the latest. Cocoapods depends on ruby, and ruby comes with gems. The ruby version of the mac system is 2.6.x, which may report an error. Therefore, it is recommended to upgrade to the latest version and set the PATH environment variable.
brew install cocoapods
Watchman is a react-native debugging tool. It is recommended to install the latest version using brew.
brew install watchman
npm is a javascript package management tool, which will be installed when installing nodejs.
Please use npm to install yarn tool globally.
npx install -g yarn
Please use npm for global installation of react-native-cli tool.
npx install -g react-native-cli
create-react-native-library is a tool for creating react-native library projects. Optional installation.
git submodule update --init
git submodule foreach "git checkout dev"
git submodule foreach "git pull"
# for MacOS platform
yarn cpp
# for Windows platform
yarn cpp_win
yarn install
ce example && yarn start
cd example && yarn ios
cd example && yarn android
npm version prerelease --preid=beta
npm publish --tag=beta
git push --tags
sh scripts/publish_agora_package.sh 1.0.5-rc.1 rc ~/Output/agora
Note Keep the same name as the compressed package and folder. It is recommended that there be no space.
npx typedoc --version
TypeDoc 0.22.17 Using TypeScript 4.7.3 from /opt/homebrew/lib/node_modules/typedoc/node_modules/typescript/lib
npx typedoc --out ./docs/typedoc --json ./docs/typedoc/typedoc.json --tsconfig ./tsconfig.json --readme ./docs/rn_api_overview.md ./src/index.ts
npx typedoc --out ./docs/typedoc --json ./docs/typedoc/typedoc.json --tsconfig ./tsconfig.json --readme ./docs/rn_api_overview.zh.md ./src/index.ts
The solution to the problem that uploading to the server causes the icon to be too large:
find and remove <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg>
find and replace "class="title">react-native-chat-sdk" to "class="title">Chat SDK for React Native v{x.x.x}"
find and replace in index.html "
" to ""find and remove <li>Defined in <a href="https:\/\/github\.com\/easemob\/react-native-chat-sdk(_|\/|\s|[0-9]|[a-z]|[A-Z]|#|\.|"|>|:)+<\/a><\/li>
in all files for agora documents.
find and replace react-native-chat-sdk
to react-native-agora-chat
in all files for agora documents.