The multi-package repository is built in the same way as common projects, except that global configuration and multi-package management are required and the reuse of dependencies is optimized.
You can take the following steps to build the project:
On MacOS system, proceed as follows:
- Download the repository
- Run script to execute initialization
- Configure files
- Add necessary files (optional)
Repository address: https://github.com/easemob/easemob-uikit-reactnative/
If you download it using a git command, you need to switch to the corresponding branch.
git clone --branch dev git@github.com:easemob/react-native-chat-library.git
Run the command in the root directory of the repository.
# Initialize the project
yarn
# Generate configuration files env.ts / config.local.ts / version.ts
# After execution, these files will be added to the respective directories. If they are not added, please find the reason or add them manually.
yarn yarn-prepack
Note
yarn-prepack
is a command set primarily used to generate necessary files including env.ts
, version.ts
, config.local.ts
, and rename.ts
. The env.ts
file also requires the appKey
parameter to be filled.
If the project is utilizing react-native-firebase/messaging
, additional files need to be added. For ios
, add the GoogleService-Info.plist
file. For android, add the google-services.json
file. For detailed information, refer to their respective documentation linked in the reference section.
-
Outdated MacOS system version Upgrade the system.
-
Outdated dependencies in the MacOS environment Update the software.
-
Compilation error, the
GoogleService-Info.plist
orgoogle-services.json
file cannot be found Add the necessaryFCM
files.