cyph / cordova-plugin-chooser

Cordova file chooser plugin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with Cordova 9.0.0 and Xcode 10.2

ibudai opened this issue · comments

Getting this error in Xcode 10.2:
SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'mFILOS')

Getting this error with Cordova 9.0.0:
Executing script found in plugin cordova-plugin-add-swift-support for hook "after_prepare": plugins/cordova-plugin-add-swift-support/add-swift-support.js
Using "requireCordovaModule" to load non-cordova module "glob" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
CordovaError: Using "requireCordovaModule" to load non-cordova module "glob" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)

Could you please add support for Cordova 9.0.0 and Swift >=4.0?

@ibudai I managed to get this working on Xcode 10.2 by upgrading the cordova-plugin-add-swift-support dependency to 2.0.2. I'm still using Cordova 8.x so can't say whether this would resolve the other issue as well.

I am using ionic 3, so used the cordova-plugin-add-swift-support dependency with version 1.7.1 after that you have to specify the swift version preference in config.xml as below put that under
<platform name="ios">
<preference name="UseSwiftLanguageVersion" value="4" />

For higher version of the plugin you can define
<preference name="UseSwiftLanguageVersion" value="5" />

Hope that helps.