The SelfHelp Mobile app is a tool thar renders SelfHelp CMS in the app The basic concept is as follows:
Pages are organized as menus. Sub pages are organized as sub-menus
- require JAVA 17
- set the NODE_ENV: see the commands bellow in the section
based on projects
- generate file
./src/env/project.config.ts
with command:node ./src/env/script.js
ionic cap add android
- for
android
copy filegoogle-services.json
inandroid/app
folder npx capacitor-assets generate
- add resourcesionic cap build
ionic cap sync
ionic cap sync --inline
for debugging add source mapsnpx ionic cap run android --target=ce09193988d5244e0d7e --livereload --external --configuration=production
- local command for Stefan's tabletionic capacitor run android -l --external
for local testing; check firewall and ports if it does not work on device but works on emulator. Also the device should be in the same network. Check if node is added.ionic cap run ios -l --external
- iOS - after the error, go to the folder and renameyour_app.app
toApp.app
fix
- run
ionic cap build
- run
ionic cap copy
- run
ionic cap sync
- then in Android / Xcode studio generate bundle and sign it
- Set the environmental variable. Check the options in
capacitor.config.ts
- Windows:
- CMD:
set NODE_ENV=habirupt
, check:echo %NODE_ENV%
- Powershell:
$env:NODE_ENV = "habirupt"
, checkecho $env:NODE_ENV
- CMD:
- Unix:
NODE_ENV=habirupt
- Windows:
- Run the commands
- run
ionic cap build
- run
ionic cap copy
- run
ionic cap sync
- run
- Generate the icons:
- Powershell:
npx capacitor-assets generate --assetPath "./projects/$env:NODE_ENV"
- Powershell:
- Update the android or iOS project:
- Powershell:
npx trapeze run .\projects\$env:NODE_ENV\config.yaml --android-project android
Be sure that the files are not locked when executed. Sometimes a java process is not closed and keep the files locked. Kill it.
- Install:
npm install -g appcenter-cli
- Login:
appcenter login
- Create: create react-native app in the appcenter web interface
- Publish:
ionic cap build android
ionic cap build ios
ionic cap sync android
ionic cap sync ios
- Android
appcenter codepush release -a TPF-UniBe/SelfHelp-Android -c android/app/src/main/assets/public/ -d Production -t 3.3.0 --description 'v3.3.12' --mandatory true
- History Check:
appcenter codepush deployment history -a TPF-UniBe/SelfHelp-Android Production
- iOS
- create production:
appcenter codepush deployment add -a TPF-UniBe/SelfHelp-ios Production
- check keys:
appcenter codepush deployment list -k --app TPF-UniBe/SelfHelp-ios
appcenter codepush release -a TPF-UniBe/SelfHelp-ios -c ios/App/App/public/ -d Production -t 3.0.0 --description 'My Description' --mandatory true
- History Check:
appcenter codepush deployment history -a TPF-UniBe/SelfHelp-ios Production
ionic g component styles\myCoolStyle
- the command should be executed in the SelfHelpMobile folder