Sendbird React Native sample using Sendbird SDK.
- Node
- NPM
- Cocoapods
- XCode
- XCode Command Line Tools
- Android Studio (+Android SDK/Google API)
-
Install React Native CLI.
npm install -g react-native-cli -
Install required packages.
npm install -
(iOS only) Pod install.
cd ios pod install pod update -
(iOS only) Add library in XCode.
- Open XCode and load workspace, you should load *.xcworkspace.
-
Run the sample. Before starting, you should launch device emulator (or actual device) to run the sample in Android. This sample is not available for real device in iOS due to Apple Development Policy. In order to run React Native sample in real device, follow React Native official guide for your own setup.
npx react-native run-android npx react-native run-ios
For iOS, you may also launch directly from Xcode.
- In general
- You can run
npm run cleanfrom root directory, this might help to solve some issues and clean old builds. - You can delete
package-lock.json, but we do not recommend it for compatibility issues. Do it at your own risk. - Make sure you have prerequisite softwares installed before you run this app, they can be found here: https://facebook.github.io/react-native/docs/getting-started.
- Deleting
node_modulesfolder and reinstalling the dependencies could help.
- You can run
- iOS
- Clean the build Cmd+Shift+K, also just rebuilding without cleaning the build can work sometimes.
- Do
pod updateand thenpod installin the ios/ folder - Delete the
ios/buildfolder. - It is better not to change any build phases, rules, settings in XCode, as it may cause further issues.
- You'd better to not update packages in
package.json, orios/Pods, or Android packages versions.
- Android
- If you run on real device, check if everything is installed especially Android studio.
- Check if your device is visible by
adb devices, sometimes it may not work or have lags. In this case call:adb kill-serverandadb start-server. - You might build the project using
npx react-native run-android, but if it fails you might need to run it with Android studio.