Cordova Slack Digest

Thu, 30 Sep 2021 08:21:06 GMT

User count: 4634

Join the conversation at slack.cordova.io

Channel #general (9 messages)


Wed, 29 Sep 2021 16:14:01 GMT

@khatridevk says

I am seeing some UI issues on my cordova app after updated to iOS 15 recently,

  • dropdowns are displaying without border
  • using cordova-plugin-image-picker , when pop up opens it shows the list of folders, after folder selection next screen is blank, thumbnails are not shown but file selection happens. Similar white screen issue was seen during ios13 update for native date/time control, fix was to force light mode to entire app.

Wed, 29 Sep 2021 16:22:09 GMT

@norman137 says

DOM based issues will have to be reported against Webkit.

I've personally saw an issue with transitions introduced in iOS 15, particularly if you mix/interchange units... e.g. we had a starting value of 0px and an ending value of 85% which broke the transition in iOS 15. The work around was to keep units consistent, so 0%-85% worked.

Wed, 29 Sep 2021 16:22:49 GMT

@norman137 says

For the image picker plugin, you should raise an issue against the plugin author.

Wed, 29 Sep 2021 20:53:00 GMT

@fortuna says

I don‘t think the build issue is M1. It’s an updated sdk (which M1 requires). So Cordova should approve https://github.com/apache/cordova-osx/pull/105 so cordova-osx continues to be useful until the new replacement is ready.

Wed, 29 Sep 2021 23:06:54 GMT

@info460 says

any tips and tricks about how to speed up / optimize performance of Cordova in general?

Thu, 30 Sep 2021 00:13:12 GMT

@norman137 says

Majority of our app generally lives in the webview, so most performance tips for HTML/JavaScript will generally apply to Cordova as ewll.

The two main things is use a SPA-style app. Frameworks like angular/ionic or reactjs will help with this. The benefit of SPA (single page apps) is that you load and initialise your webcode and native plugin code once rather than on each page load when navigating between pages. Obviously some care is required to avoid memory leaks.

The second thing is to ensure you have a meta viewport tag. Browsers will recognise this tag and treat the page as a “mobile application”. Without it will enable traditional browser behaviour known as the ghost click. That is when you tap, the browser will wait 300ms before it triggers a click event. With the meta viewport tag however, it will trigger the click event instantly.

https://cordova.apache.org/docs/en/10.x/guide/next/index.html

Thu, 30 Sep 2021 00:26:06 GMT

@norman137 says

Outside of that -- standard JS/HTML/DOM performance rules applies... stuff like

  • DOM is slow, so avoid unnecessary changes/updates to the DOM
  • Know what slows down JS, etc, avoid heavily nested functions -- closures are slow.
  • Loop over arrays, not objects... e.g. use for (i++) loops, not for...in loops.
  • Functional programming is slow compared to procedural programming, so again... use for (i++) loops, not Array.forEach

Thu, 30 Sep 2021 07:57:15 GMT

@chris.khong says

Anyone gets the https://developer.android.com/jetpack/androidx/releases/appcompat#1.4.0-beta01|androidx.appcompat:appcompat:1.4.0-beta01 automatically, which is a beta version released yesterday. I dont know how my project automatically gets this version. Does anyone have the same issue? I use cordova-android@10.0.0

Thu, 30 Sep 2021 07:59:12 GMT

@chris.khong says

Channel #cordova-ios (1 messages)


Wed, 29 Sep 2021 14:33:12 GMT

@javarea says

Hello, is there a way to open an ios application within another application and be able to send information between them?

The development in android is using onActivityResult and StartActivityForResult. Is there something similar in iOS?

Channel #cordova-android (5 messages)


Thu, 30 Sep 2021 01:18:34 GMT

@ucheozoemena says

Hi folks, is anyone getting this error recently in their builds? > The minCompileSdk (31) specified in a > dependency‘s AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) > is greater than this module’s compileSdkVersion (android-30). > Dependency: androidx.appcompat:appcompat:1.4.0-beta01. > AAR metadata file: /Users/vagrant/.gradle/caches/transforms-3/cf625c79807b9ffa78b701a3a960597e/transformed/appcompat-1.4.0-beta01/META-INF/com/android/build/gradle/aar-metadata.properties. This error only started occurring for me about 5 hours ago, without any changes to plugins or native code. From what I‘ve read it seems that there is a plugin that isn’t pinned to a specific version of the androidx:appcompat dependency, but I can't seem to find which one. Has anyone seen and fixed this problem recently in their own build pipeline?

Thu, 30 Sep 2021 01:22:40 GMT

@norman137 says

Try searching inside your plugins/ folder for appcompat

Thu, 30 Sep 2021 01:23:39 GMT

@norman137 says

cordova does depend on appcompat, but we pin it to exactly version 1.3.1

Thu, 30 Sep 2021 01:25:00 GMT

@norman137 says

If you‘re using cordova-android@10, then you’ll be able to confirm via looking at <cordova-project>/platform/android/cdv-gradle-config.json -- you should have "ANDROIDX_APP_COMPAT_VERSION": "1.3.1",

Thu, 30 Sep 2021 01:26:11 GMT

@norman137 says

Which is used in /platforms/android/app/build.gradle -- implementation "androidx.appcompat:appcompat:${cordovaConfig.ANDROIDX_APP_COMPAT_VERSION}"