Mobile
DWKit in its mobile frontend displays mobile forms which as a rule are created in DWKit admin panel. The approach of working with Mobile forms like Web forms.
How to launch on physical devices
We recommend using our Expo demo stand.
- Install Expo on your device.
- Scan QR code on the Demo page and open the app.
- Set URL in the input.
- The app will connect to your DWKit installation..
How to start
-
Install tools.
For Android:
- Android Studio: https://developer.android.com/studio
- ADB: brew cask install android-platform-tools or https://www.xda-developers.com/install-adb-windows-macos-linux/
- JDK: brew cask install adoptopenjdk/openjdk/adoptopenjdk8 or https://docs.oracle.com/en/java/javase/11/install/installation-jdk-microsoft-windows-platforms.html
- Android emulator: https://developer.android.com/studio/run/managing-avds
For iOS, you need to install XCode.
-
Install dependencies:
-
Open "mobile" folder and run
install-deps.ps1
script.For macOS/Linux:
pwsh ./install-deps.ps1
pwsh ./install-ios.ps1For Windows:
powershell install-deps.ps1
-
Run Android:
-
Open mobile/android in Android Studio and build it.
-
Run:
chmod +x android/gradlew (For Linux/macOS only)
-
Physical devices:
react-native start
-
Emulator in Windows:
npm run android
-
Emulator Linux:
npm run androd-linux
or for Windows:
npm run android
-
-
Run iOS (it works for macOS only!):
npm run ios
For some cases you need to clear Android files:
cd android && ./gradlew clean
-
How to Debug
- Install React Native Debugger: https://github.com/jhen0409/react-native-debugger.
- Run React Native Debugger and an emulator.
- You need to switch debug mode on for the emulator.
- For iOS press Cmd + D
- For Android in Metro terminal press R.
- In the mobile interface choose Debug. For more information: https://reactnative.dev/docs/debugging
How to build iOS package
Open ios
folder in xCode and build the project.
How to build APK (Android)
Place your terminal directory to android using:
cd android
Then run the following command:
For Windows:
gradlew assembleRelease
For Linux and macOS:
./gradlew assembleRelease
Check the APK in -> android/app/build/outputs/apk/release/app-release.apk.