akofman / cordova-plugin-dbmeter

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

Compile error in Xcode 8.3 #4

Closed aurelGabo closed 6 years ago

aurelGabo commented 7 years ago

Hello, Thank you for this cool plugin. We've used it to build a Cordova app detecting people breath. It is working as expected in Androïd, and for iOS only in debug version. We are going to publish the app on the app store and when we want to build the release version, Xcode 8.3 wants us to upgrade to Swift 3 :/ After doing the upgrade, we have the following errors :

Is there a way to resolve that and publish the app ? ... we are really annoyed (thanks Apple grrr...)

Thanks in advance !

albernaz commented 7 years ago

The iOS part is written in Swift so the Swift support plugin is configured as a dependency in plugin.xml.

⚠️ Because this plugin doesn't support Swift 3 at the moment, the following preference has to be added in your project :

<preference name="UseLegacySwiftLanguageVersion" value="true" />

aurelGabo commented 7 years ago

Thank you for your reply ! I saw this in the doc, and added the preference in config.xml but it doesn't work. Perhaps I have to put it in the plugin.xml of dbmeter ?

burbas commented 7 years ago

I can't find the UseLegacySwiftLanguageVersion option in XCode 8.3(.1) anymore. Is this deprecated or am I missing something?

aurelGabo commented 7 years ago

You can't use Swift 2 with XCode 8.3 indeed. So unfortunaltly I think you can't use this plugin anymore. The only thing we found is to go back to XCode 8.2 just for one project.

burbas commented 7 years ago

I tried to convert the code into Swift3, but get a lot of complains from the runtime about no access to InverseDeviceId or something like that. Will keep hammering on this though.

LeoLetourneur commented 7 years ago

Hi, I have the same issue with Swift3, is there any fix or will you do it ? When ? Thanks a lot !

segux commented 7 years ago

Same for me in XCode 8.2. Will you support this issue?

akofman commented 6 years ago

Hello guys,

These issues should be fixed with the last version of this plugin (2.0.1). Let me know if it's not the case ;)

edthenet commented 6 years ago

I use 2.1.0 of the plugin in an ionic 3 project. even got it to work in an iOS simulator, but when i try to run it on a real iPhone i get errors in xcode and the app stops working.

I have tried everything that is mentioned in https://stackoverflow.com/questions/32771796/dyld-library-not-loaded-rpath-libswiftavfoundation-dylib but that didn't bring me to the solution. Does anyone have any suggestions?