akofman / cordova-plugin-dbmeter

:microphone::mega: Cordova plugin to get decibels from the microphone
Apache License 2.0
34 stars 29 forks source link

Crashes on iOS – CordovaPlugins/DBMeter.swift:5: Fatal error #24

Open danielernerot opened 2 years ago

danielernerot commented 2 years ago

I’m implementing cordova-plugin-dbmeter through the Ionic Native wrapper (@ionic-native/db-meter). It works fine on Android, but on iOS, the plugin crashed when initialized. It builds fine in Xcode, though. And all other plugins (Capacitor, Ionic Native, Cordova) works just fine.

The error message I get is:

CordovaPlugins/DBMeter.swift:5: Fatal error: Use of unimplemented initializer ‘init(webViewEngine:)’ for class ‘CordovaPlugins.DBMeter’

And here it crashes:

image

I’ve tried using the plugin without the wrapper, but no success. I read that the plugin requires cordova-plugin-add-swift-support, but Capacitor doesn’t support the plugin cordova-plugin-add-swift-support and should provide the necessary Swift support anyway.

Anyone has got this to work, or have any ideas? Getting lots of gray hair over this.

EYALIN commented 1 year ago

@danielernerot this has been fixed at my forked repo ( can see https://github.com/akofman/cordova-plugin-dbmeter/issues/25)