Skip to content

mauron85/cordova-plugin-add-swift-support

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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="1.3.1"/>

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.

Importing Swift into ObjectiveC code

Because ProductModuleName of application using some Swift Cordova plugin is different than ProductModuleName of the plugin itself, you need to modify your .m files imports to:

#import "Swift2Objc-Header.h"

* instead of #import "ProductModuleName-Swift.h"

This header will be created by this plugin and automatically registered with xcode project.

License

Apache-2.0 © Alexis Kofman

About

🔨 Swiftify your Cordova app !

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%