Cordova Slack Digest

Sat, 12 Sep 2020 08:23:20 GMT

User count: 4115

Join the conversation at slack.cordova.io

Channel #random (1 messages)


Fri, 11 Sep 2020 13:18:35 GMT

@owenocq says

@owenocq has left the channel

Channel #general (9 messages)


Fri, 11 Sep 2020 09:30:42 GMT

@aquinn says

Hi all, any ideas about issues with plugins with Swift code? https://github.com/AyogoHealth/cordova-plugin-update-notifier/issues/4

Fri, 11 Sep 2020 12:54:18 GMT

@owenocq says

In Cordova 6.0, 6.1.0, 6.1.1 WKWebView no longer scales the viewport to fit the device, whereas in 5.1.1 and earlier it did. This results in a 768px layout not scaling to fit the larger ipad models. I'm exploring a js/css zoom calculation fix, but would prefer if I could change a line in Cordova or add a config preference. Can anyone point me on the path to fixing?

Fri, 11 Sep 2020 13:16:27 GMT

@owenocq says

My other big bad monster bug is the SQLite plugin throws ‘waitForSyncReply’ error if I double tap a button that runs a query. This then stops the simulator responding to future presses (!). 

Happens with both ‘cordova-plugin-sqlite-2’ and ‘cordova-sqlite-storage’, and I think it affects simulator iOS10/11/12/13/14 and on device running iOS10, but oddly not on device running iOS13. Even though I‘m targeting iOS13+, I’m not confident that the bug won't happen to real users :(

I saw this question: https://stackoverflow.com/questions/41163998/how-to-fix-waitforsyncreply-time-out-with-meteor-cordova-ios-app

Which gives the impression WKWebView falls over if doing anything intense (!). The sqlite plugin runs seems slower than the UIWebView running WebSQL. Any tips on how to solve (or spirit-lifting positive affirmations)?

Fri, 11 Sep 2020 13:40:20 GMT

@ari9411530 says

Hello @everyone. I would like to get video from camera of IOS and save to Firebase. I am using cordova-plugin-camera for getting photo, but video is not working. Who can help me and guide me to get video from Camera. Thanks.

Fri, 11 Sep 2020 13:40:21 GMT

@slackbot says

‘[at]everyone broadcast, really!?’ This better be important enough that you notified thousands of people.

Fri, 11 Sep 2020 13:45:55 GMT

@jordi289 says

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media-capture/index.html

Fri, 11 Sep 2020 20:19:21 GMT

@owenocq says

Third bonus topic of day! JS date objects are very slow in simulator. And in particular the date set functions. I‘ve tested Cordova 5.1.1 and 6.1.1 and both are slow so it might be a WKWebView issue, as the old UIWebView didn’t seem to have any noticeable slow down. Here's some simple bench code:

	var d = new Date()
	return new Date( d.getFullYear(), d.getMonth(), d.getDate(), 12 
}
function TodaySimple2(){
	var d = new Date()

	d.setMilliseconds(0)
	d.setSeconds(0)
	d.setMinutes(0)
	d.setHours(12) // has to mirror CloneDate()
	
	return d
}
function TimeFunc(func, label){
	console.time(label)
	for (var i=0; i<1000; i++){ 
		func()
	}
	console.timeEnd(label)
}
console.log( 'TodaySimple1()=', TodaySimple1() )
console.log( 'TodaySimple2()=', TodaySimple2() )
TimeFunc(TodaySimple1, 'TodaySimple1')
TimeFunc(TodaySimple2, 'TodaySimple2')```
Example iOS13 simulator results:
TodaySimple1() = 1856.848ms
TodaySimple2() = 8010.407ms

Which is 4x difference, but note both functions are running very slow. 

Example Chrome results:
TodaySimple1() = 3.15478515625ms
TodaySimple2() = 3.546142578125ms

Which equates to Chrome running about 2259x faster than the simulator 😐

Has anyone encountered this? Is there a way to speed up date manipulation?

Fri, 11 Sep 2020 20:29:55 GMT

@norman137 says

Simulators in general are very slow. You can't really do performance testing in a simulator.

Fri, 11 Sep 2020 20:39:51 GMT

@norman137 says

https://developer.apple.com/forums/thread/108668?answerId=400687022#400687022

I don‘t really have any evidence but I’m pretty sure while when you build/run the simulator, obviously your code is compiled for x64 architecture, so the mac can run it, but I think it does a lot of emulating/system call translations.

Compared to android simulators, which simulation is powered by Intel‘s HAXM simulator, the entire android simulated OS runs natively in x64 and doesn’t require emulating/translating system calls (unless if you actually run an android ARM emulator, which is also painfully slow)

Channel #cordova-ios (1 messages)


Fri, 11 Sep 2020 09:30:53 GMT

@aquinn says

Hi all, any ideas about issues with plugins with Swift code? https://github.com/AyogoHealth/cordova-plugin-update-notifier/issues/4

Channel #cordova-android (1 messages)


Fri, 11 Sep 2020 19:12:39 GMT

@patrick662 says

Well this is new. I‘m building with CLI 10 and Android 9. I’ve tested on several Android phones and my app just works. I can login and use the app. BUT, if the device is a Samsung S20 I get this message. Anyone know of any issues with the app hanging? Basically the screen starts and then blanks and after 30 seconds I get that dialog.