slack-digest/2020-10-27.md
Tue, 27 Oct 2020 08:33:24 GMT
Join the conversation at slack.cordova.io
Mon, 26 Oct 2020 16:09:07 GMT
@mcsd says
Hi there, I’m a newbie in Cordova, my purpose is to convert my currently Hybrid WebApp to an Android and iOS native app … is there a great course tutorial that you recommend guys? … I’ll appreciate your help …
Mon, 26 Oct 2020 16:18:47 GMT
@osaintilien55 says
Is there a way to interrupt the build command? Other than closing terminal and restarting?
Mon, 26 Oct 2020 16:20:13 GMT
@mcsd says
maybe CTRL + C or CMD + C
Mon, 26 Oct 2020 16:20:33 GMT
@osaintilien55 says
perfect! thanks
Tue, 27 Oct 2020 01:02:54 GMT
@osaintilien55 says
So I have been working on this for a while now(months), and I'm just now understanding the value of React and also the spa method. I am considering trying react but I don't think my app can really be spa because of how big it's going to be. Here is a screen recording of what I have so far (excuse the bugginess). Do you think I can use react in my app? I just ask because although I know it's good to know, would hate to find out after spending much time learning it, I can't really use it for this particular project. https://www.youtube.com/watch?v=Zl-1Rn-Sl6Y
Tue, 27 Oct 2020 01:04:16 GMT
@osaintilien55 says
Wow lol wasn't expecting my youtube video to be playable here, how convenient.
Tue, 27 Oct 2020 01:25:33 GMT
@norman137 says
I use react web with my cordova projects, and my apps are quite large...
- offline capable with network sync when network is available
- Manages several thousands of road lines, lays them out geospatially on google maps.
- Uses JWT authentication token with a short-life access token, and a long-life renew token setup. Another one of my apps is smaller (that is the UI is very simple) but it does a lot of work. It analyses road roughness by collecting acceleration points while you drive. It needs to poll at a rather high frequency, so after recording for a few hours I have about 50-100MB of json data recorded.
React web isn't the only answer, but if used correctly it can be an answer, imo.
Tue, 27 Oct 2020 01:37:26 GMT
@osaintilien55 says
Got it thanks 👍
Tue, 27 Oct 2020 01:39:19 GMT
@osaintilien55 says
Oh and all these apps you made with react were all spa right?
Tue, 27 Oct 2020 01:39:28 GMT
@norman137 says
yes
Tue, 27 Oct 2020 01:39:47 GMT
@norman137 says
it's not very efficient having to unload/reload the "application" on every page load 😉
Tue, 27 Oct 2020 01:40:00 GMT
@osaintilien55 says
Right okay
Mon, 26 Oct 2020 17:00:11 GMT
@savoier says
Hi guys! New to the electron family and I have two problems I need to address. We have an ionic app that runs on Android, iOS and Windows and we want to add electron to it to support other platforms.
First problem is that some of our css files point to images in the asset folder using the '/' root directory starting point (ie: /assets/img/image.png) Problem is that in electron this resolves to C:/ on windows for some reason! Any idea how to fix this?
Second problem is that app icons don't seem to be copied in the resulting build even with the correct settings in config.xml.
<platform<preference name="ElectronSettingsFilePath" value="resources/electron/settings.json" /> <icon height="50" src="resources/windows/icon/StoreLogo.scale-100.png" target="StoreLogo" width="50" /> <icon height="120" src="resources/windows/icon/StoreLogo.scale-240.png" target="StoreLogo" width="120" /> <icon src="resources/windows/icon/smalllogo.png" target="Square30x30Logo" /> <icon src="resources/windows/icon/Square44x44Logo.png" target="Square44x44Logo" /> <icon src="resources/windows/icon/Square70x70Logo.png" target="Square70x70Logo" /> <icon src="resources/windows/icon/Square71x71Logo.png" target="Square71x71Logo" /> <icon height="150" src="resources/windows/icon/Square150x150Logo.png" target="Square150x150Logo" width="150" /> <icon height="150" src="resources/windows/icon/Square150x150Logo.scale-100.png" width="150" /> <icon height="310" src="resources/windows/icon/Square310x310Logo.png" width="310" /> <icon height="310" src="resources/windows/icon/Square310x310Logo.scale-100.png" target="Square310x310Logo" width="310" /> <icon src="resources/windows/icon/Square310x310Logo.png" target="Square310x310Logo" /> <icon src="resources/windows/icon/Wide310x150Logo.png" target="Wide310x150Logo" /> <splash height="480" src="resources/ios/splash/screen-iphone-portrait.png" width="320" /> <splash height="970" src="resources/ios/splash/screen-iphone-portrait-2x.png" width="640" /> <splash height="1024" src="resources/ios/splash/screen-ipad-portrait.png" width="768" /> <splash height="2048" src="resources/ios/splash/screen-ipad-portrait-2x.png" width="1536" /> <splash height="768" src="resources/ios/splash/screen-ipad-landscape.png" width="1024" /> <splash height="1536" src="resources/ios/splash/screen-ipad-landscape-2x.png" width="2048" /> <splash height="1136" src="resources/ios/splash/screen-iphone-568h-2x.png" width="640" /> <splash height="1334" src="resources/ios/splash/screen-iphone-portrait-667h.png" width="750" /> <splash height="2208" src="resources/ios/splash/screen-iphone-portrait-736h.png" width="1242" /> <splash height="1242" src="resources/ios/splash/screen-iphone-landscape-736h.png" width="2208" /> <splash height="2436" src="resources/ios/splash/screen-iphone-portrait-2436h.png" width="1125" /> <splash height="1125" src="resources/ios/splash/screen-iphone-landscape-2436h.png" width="2436" /> </platform>``` Well I have a few other issues but i'll start with those aha
Mon, 26 Oct 2020 17:10:46 GMT
@savoier says
I had the same problem on Windows for my problem #1, So I made a before_compile hook script to manually change the path for windows only (Because the values that work for windows does not work for iOS and android)
I can't seem to get the hook to run for the electron build even if the following is in the electron platform section of the config.xml: <hook src="hooks/transform-style-paths.js" type="before_compile" />
Are hooks supposed to work for electron?
Tue, 27 Oct 2020 08:19:36 GMT
@prasunjajodia says
Hooks do work for electron. I have multiple hooks enabled on my electron app.. For the file address, maybe try using relative address instead of absolutes?
Tue, 27 Oct 2020 08:21:03 GMT
@prasunjajodia says
For icons, I had to copy my icons manually to
platforms/electron/build-res/{build-type}So for my appx, it wasplatforms/electron/build-res/appx