Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cordova-plugin-add-swift-support

akofman48kApache-2.02.0.2

Add Swift support to your iOS plugins

cordova, ios, swift, swift-support, ecosystem:cordova, cordova-ios, cordova:plugin

readme

npm version Build Status npm

cordova-plugin-add-swift-support

swift-128x128

This Cordova plugin adds the Swift support to your iOS project.

Installation

You can add this plugin directly to your project:

cordova plugin add cordova-plugin-add-swift-support --save

Or add it as a dependency into your own plugin:

<dependency id="cordova-plugin-add-swift-support" version="2.0.2"/>

By default, the Swift 4 support is added but the legacy version (2.3) can still be configured as a preference, inside the project's config.xml, within the <platform name="ios"> section:

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

Or it is possible to specify the version as following, inside the project's config.xml, within the <platform name="ios"> section:

<preference name="UseSwiftLanguageVersion" value="5" />

If needed, add a prefixed Bridging-Header file in your plugin in order to import frameworks (MyPlugin-Bridging-Header.h for instance). As an example you can have a look at this plugin.

If the cordova-plugin-add-swift-support plugin is already installed to your project, then you can add your own Swift plugin as usual, its prefixed Bridging-Header will be automatically found and merged.

Contributing

The src folder contains ECMAScript 2015 source files, the minimum Node.js version is 6 (Boron).

License

MIT

changelog

Change Log

2.0.2 (2019-04-05)

Full Changelog

Merged pull requests:

2.0.1 (2019-04-01)

Full Changelog

Closed issues:

  • add-swift-support.js of v2.0 is missing on npm #58
  • Support cordova-cli 9.0.0 - requireCordovaModule deprecation #56
  • Swift 4 support #55
  • Swift 4 is failing with latest cordova #50

2.0.0 (2019-04-01)

Full Changelog

Merged pull requests:

  • refactor: update tooling, add support for Cordova v9 #57 (timbru31)
  • Document where to specify Swift version preference #53 (eladnava)

1.7.2 (2018-03-30)

Full Changelog

Closed issues:

  • Implement catching promise rejections #51
  • *-Briding-Header.h not used #48
  • SWIFT_VERSION build setting not being applied @1.7.1 #47
  • Unhandled promise rejection (rejection id: 1): Error: Cannot find module '../cordova/platform_metadata' #44
  • Can not restore this plugin when using cordova-cli@8.0.0 #43
  • Hook won't trigger #40
  • Error adding cordova-plugin-add-swift-support #39
  • OSX support #19

Merged pull requests:

1.7.1 (2017-12-22)

Full Changelog

Closed issues:

  • SWIFT_VERSION build setting not being applied #42
  • Node.JS 8.X Support #38
  • Missing tag and changelog for 1.7.0 #33

Merged pull requests:

1.7.0 (2017-07-07)

Full Changelog

Closed issues:

  • Wrong text merged in Briding-Header.h #31
  • Phonegap Build Support #28
  • how to ? #26
  • swift3 required me to explicitly expose plugin method #23
  • Keep Xcode7 compatibility #20

Merged pull requests:

1.6.0 (2017-01-10)

Full Changelog

Closed issues:

  • Differences between plugins #24
  • Error: undefined is not a function #22
  • Debug builds should be compiled without optimizations #18
  • Hook fails to run properly with cordova 6.3.1 #14

Merged pull requests:

1.4.0 (2016-10-07)

Full Changelog

Closed issues:

  • [Xcode 8] Update embed Swift standard libraries setting #17
  • Set "Legacy Swift Language Version" #15

Merged pull requests:

1.3.2 (2016-09-03)

Full Changelog

Closed issues:

  • Changes are made only to the current configuration (tipically Debug) #12
  • Windows support #5
  • App Store: invalid swift support #4

Merged pull requests:

  • Correctly update the properties for all build configurations #13 (bugnano)
  • Hooks #8 (akofman)

1.2.0 (2016-06-10)

Full Changelog

Closed issues:

  • Changing hook type #3

Merged pull requests:

1.1.0 (2016-06-09)

Closed issues:

  • Check the version of cordova-ios instead of the version of the CLI #1

Merged pull requests:

* This Change Log was automatically generated by github_changelog_generator