[Swift Support Plugin] [semver] cordova-plugin-add-swift-support getting issue while generating iOS
Question
Forge component by David Sousa
Application Type
Mobile

Hi,

We are getting error to generate the iOS code while using MABS 6.3 with swift support plugin.

If Use below plugin version inside swift support plugin:

{

    "plugin": {

        "url": "https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.0"

    }

Getting "Build failed with the following error: Error installing a Cordova plugin. Due to security concerns, the required dependency for the 'semver' node module in a plugin hook was missing. For more details, check the product documentation on how to ensure your plugins node dependencies." Error.

And If use latest version to get the semver dependency:

{

    "plugin": {

"url": "https://github.com/DavidSousa/cordova-plugin-add-swift-support#v2.0.2"

  }

}

Error:

"Running command: git checkout v2.0.2

 [Build] Command finished with error code 1: git checkout,v2.0.2

 [ERROR] [Build] Error: Failed to fetch plugin https://github.com/DavidSousa/cordova-plugin-add-swift-support via git.

 [ERROR] [Build] Either there is a connection problems, or plugin spec is incorrect:

 [ERROR] [Build] Error: git: Command failed with exit code 1 Error output:

error: pathspec 'v2.0.2' did not match any file(s) known to git

 Build failed with the following error: Error fetching Cordova plugin: https://github.com/DavidSousa/cordova-plugin-add-swift-support"

Thanks,

Manish

Champion
Solution

Hi Manish,

Can you please try to use the new github release of the plugin?

Use https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.1 instead of https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.0.

If it works fine I'll release a new version in the Forge.

Thanks,

David

Hi Manish Pandey,


Try this url, without the "v":

https://github.com/DavidSousa/cordova-plugin-add-swift-support#2.0.2


Champion

Hi Manish,

This plugin was created to add Swift support to apps built with MABS versions below 6, which didn't support Swift.

For apps built with MABS 6.3 and above it's not required.

Dear David Sousa,

I have observed that you have published a new version in your git repository code:

v1.1 : Remove semver

I modified the outsystems plugin to update the link of the code as given below:

{

    "plugin": {

        "url": "https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.1"

    }


}

However now I am receiving the below error while generating iOS app (generating it in MABS 6.3):


Executing script found in plugin cordova-plugin-add-swift-support for hook "after_plugin_add": plugins/cordova-plugin-add-swift-support/src/add-swift-support.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] Error: Cannot find module 'glob'

[2021-01-11T13:36:22.450Z] [ERROR] [Build] Require stack:

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /private/var/lib/builder04/builds/e99f47c2-866f-4c9a-a2c5-43f773759001/source/plugins/cordova-plugin-add-swift-support/src/add-swift-support.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/plugman.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/cordova-lib.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/src/help.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/src/cli.js

[2021-01-11T13:36:22.450Z] [ERROR] [Build] - /usr/local/lib/node_modules/cordova/bin/cordova


[2021-01-11T13:36:22.451Z] [ERROR] [Build] Build failed with the following error: Error installing a Cordova plugin. Due to security concerns, the required dependency for the 'glob' node module in a plugin hook was missing. For more details, check the product documentation on how to ensure your plugins node dependencies.

Please note that, without this plugin I am getting the same error as @Darryl NG i.e., 

"In iOS on 11-01-2021 at 10:03:52 - Error generating application. At least one Cordova plugin used in the build requires Swift but no "Swift Language Version" build setting was defined. Check your plugins configuration. "  

Your help will be much appreciated.

Best regards,

Shounak Devbhuti

Champion

Hey Shounak,

Can you try again with v1.1? Working for me now. Thanks!

Dear @David Sousa ,

Thanks a lot for quickly fixing the issue. You are a savior.  It works like a charm now.... :) 

@Darryl NG and @Manish Pandey kindly use the below updated link in the OS plugin:

"https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.1" 

Best regards,

Shounak

Hi David Sousa,


I tried ur recommendation. However, I encountered new error and the mobile app is still no able to generate.


The error as follows:

"In iOS on 11-01-2021 at 10:03:52 - Error generating application. At least one Cordova plugin used in the build requires Swift but no "Swift Language Version" build setting was defined. Check your plugins configuration. "


Appreciate your assistance.


Thank you. Regards.


Cheers

Darryl NG

iOSBuildLog5.txt

Champion
Solution

Hi Manish,

Can you please try to use the new github release of the plugin?

Use https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.1 instead of https://github.com/DavidSousa/cordova-plugin-add-swift-support#v1.0.

If it works fine I'll release a new version in the Forge.

Thanks,

David

Hi David,

Yes It was working with new version #v1.1

Thank You for your efforts. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.