mobile-bbl-cbx
v1.1.0-prod.2
Published
CBX Mobile App project
Downloads
2
Readme
Finds and removes all node_modules inside @igtb-digital
sudo find ./node_modules/@igtb-digital -name "node_modules" -exec rm -rf '{}' +
increase heap size and prepare build for ios and android
sudo node --max-old-space-size=4096 /usr/local/bin/ionic cordova prepare ios --prod sudo node --max-old-space-size=4096 /usr/local/bin/ionic cordova prepare android --prod
increase heap size and generate .ipa and apk
sudo node --max-old-space-size=4096 /usr/local/bin/ionic cordova build ios --prod sudo node --max-old-space-size=4096 /usr/local/bin/ionic cordova build android --prod
Increase heap memory size
npm install -g increase-memory-limit increase-memory-limit
Production build issues
- Strictly use @ionic/app-scripts - 3.1.8 & typescript 2.4.2
ngc build to detect product issues
- ./node_modules/.bin/ngc build
- Open node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js and replace '#!/usr/bin/env node' to '#!/usr/bin/env node --max-old-space-size=8192'
- export NODE_OPTIONS=--max-old-space-size=8192
- sudo node --max-old-space-size=8192 /usr/local/bin/ionic cordova prepare ios --prod
iPhone x support
- Update to latest ionic-angular - 3.9.2
- Add 'fit-cover' meta tag in .html
- Add splash screen universal any
- Update status bar plugin to 2.4.2
Disable clipboard
- Add the following attribute in index.html
Disable keyboard cache
- By default ionic disables autocomplete. Please refer the below link https://ionicframework.com/docs/api/components/input/Input/
Jailbreak and Root detection
- Follow the below link for jailbreak and root detection. It uses rootbeer library for android
- cordova plugin add cordova-plugin-iroot --save https://github.com/WuglyakBolgoink/cordova-plugin-iroot/issues/7
Remove console logs in the production build
- Copy 'uglifyjs.config.js' from node_modules / @ionic / app - scripts / config / uglifyjs.config.js to 'project folder'
- Add following lines in uglifyjs.config.js compress: { drop_console: true, drop_debugger: true }
- Add following lines in package.json "config": { "ionic_copy": "copy.config.js", "ionic_uglifyjs": "uglifyjs.config.js" ... }
- Build app in prod mode
Security lists - content security policy
http://masteringionic.com/blog/2018-01-09-securing-ioniccordova-mobile-applications/
npm clean cacache issue
sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config
Publishing .apk
https://ionicframework.com/docs/v1/guide/publishing.html (Digital1234*)
- ionic cordova build --release android // 2) keytool -genkey -v -keystore cbx-digital.keystore -alias cbx-digital-app -keyalg RSA -keysize 2048 -validity 10000
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore cbx-digital.keystore /Users/POLARISFT/Senthil/Digital/Workbench/BBL/mobile-bbl-cbx/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk cbx-digital-app
- rm -rf /Users/POLARISFT/Senthil/Digital/Workbench/BBL/mobile-bbl-cbx/platforms/android/app/build/outputs/apk/release/CBX-Digital.apk
- /Users/POLARISFT/Softwares/adt-bundle-mac-x86_64-20130729_latest/sdk/build-tools/28.0.3/zipalign -v 4 /Users/POLARISFT/Senthil/Digital/Workbench/BBL/mobile-bbl-cbx/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk /Users/POLARISFT/Senthil/Digital/Workbench/BBL/mobile-bbl-cbx/platforms/android/app/build/outputs/apk/release/CBX-Digital.apk
Upgrading to WKWebView from UIWebView
- Update latest webview plugin - [email protected]
- Goto config.xml file a) Remove the below preference b) Add the following preferences
- Remove ios platform and add it again
Downgrading from WKWebView to UIWebView
- Goto config.xml file a) Remove the following preferences b) Add the below preference
- Remove ios platform and add it again
iGTB build - unbrand build - CBX Digital
- Update assets in copy.config.js -> Change "bbl-core-assets" to "core-assets" and run node copy.config.js
- Update icons and splash screens - ionic cordova resources
- IDP Login false
- Update scripts/android-resources.js [from 'notification-icon' to 'notification-icon-igtb' ]and execute for android status bar notification icon Bkkg.jpg img [src/assets/logo-images/small]
- Rename app name BBL -> CBX in config.xml
- Set the below flags as false in config.ts 6.1) PRESENT_FOOTER_WARNING_NOTES: false ( Disable payment summary warning note footer ) 6.2) PRESENT_WELCOME_TOUR_ON_STARTUP: false, ( Disable welcome tour) 6.3) ENABLE_VERSION_UPGRADE_ALERT: false ( Disable version upgrade alert )
Notification payload formats
Android - FCM - Postman - Action buttons { "to" : "c-XrjK4FF2c:APA91bEkjEVD70-MPzpPKEwAxzDXJm1TguY_Wuw89sRh_XG5Z_37ubRJnnIQ0LyqPFE69M4CpqI1wqvEFpAYDMwIErjtEq4X0YVEEdQljNy6y0r34Q3SscG-MevwIsEMQqa1F3vXmVGe", "data" : { "body" : "Payments pending for approval", "title": "Payments pending", "status" : "PENDING APPROVAL", "actions":[{ "title":"Approve", "callback":"Approve", "foreground":false, "inline":true }, { "title":"Reject", "callback":"Reject", "foreground":false, "inline":false }] } } Payments payload { "to":"dmcHWd_0eLQ:APA91bHmGuJ7BNQ2VOnmL4NvjuGy2iOFKtNAF8QZnCRMcKzOUzW6BsXNn-yRHxaC0bkJvgmUCRkUWKAt-pdzrRPpdv8dVOAAyxzTa9XXc6PKsR2pJlKwzOIM3Vty4vFZhPlgl4PbxD4h", "data": { "category": "AUTHORIZE", "title": "Payment is pending for your approval", "alert": "Cross Border payment of (456324 THB) to Biogen-807-K *9353 KH16204192011103759353 from Premier Group *0011 30000000000011 is pending verification." "debtorAccount": { "currency": { "code": "THB" }, "corporate": { "id": "a86a8817-2f91-5ce2-a790-efc811965044" } }, "paymentRailObj": { "code": "A2A3P" }, "paymentReason": { "code": "A2ATPT" }, "releaseDate": "2018-07-23T00:00:00.000Z", "subProduct": "PaymentInstruction", "product": "paymnt", "actionInfo": { "currentAction": "add", "nextAction": "approve", "referenceId": "11U5F1lGesVcxzo", "rejectionInfo": null }, "actions":[ { "title":"Approve", "callback":"Approve", "foreground":true, "inline":false }, { "title":"Reject", "callback":"Reject", "foreground":true, "inline":false } ] } } —————————————————————————————— iOS - APNS - Action buttons { "aps" : { "category" : "AUTHORIZE", "title" : "Payments pending for your approval", "alert" : "SWIFT payment reference no.23498728374 of 2500 EUR is pending for your approval", "badge" : 1, "sound" : "chime.aiff" }, "status":"PENDING APPROVAL" }
Payments payload { "aps": { "category": "AUTHORIZE", "title": "Payment is pending for approval", "alert": "Cross Border payment of 3500 EUR to Biogen-807-K *9353 KH16204192011103759353 from Premier Group *0011 30000000000011 is pending verification." }, "debtorAccount": { "currency": { "code": "THB" }, "corporate": { "id": "a86a8817-2f91-5ce2-a790-efc811965044" } }, "paymentRailObj": { "code": "A2A3P" }, "paymentReason": { "code": "A2ATPT" }, "releaseDate": "2018-07-23T00:00:00.000Z", "subProduct": "PaymentInstruction", "product": "paymnt", "actionInfo": { "currentAction": "add", "nextAction": "approve", "referenceId": "11U5F1lGesVcxzo", "rejectionInfo": null } }