becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

iOS PhoneGap Build error for undeclared type #11

Closed VittorioMobimentum closed 7 years ago

VittorioMobimentum commented 8 years ago

Don't know if related to #10 but I can't get it built with Phonegap Build, also trying with cordova-plugin-add-swift-support added to plugin list. Error is:

tmp/gimlet/2078210/project/build/JarvisDev.build/Release-iphoneos/JarvisDev.build/Objects-normal/arm64/ZeroConf.swiftdeps -o /tmp/gimlet/2078210/project/build/JarvisDev.build/Release-iphoneos/JarvisDev.build/Objects-normal/arm64/ZeroConf.o
/tmp/gimlet/2078210/project/JarvisDev/Plugins/cordova-plugin-zeroconf/ZeroConf.swift:10:34: error: use of undeclared type 'CDVPlugin'
@objc(ZeroConf) class ZeroConf : CDVPlugin  {
                                 ^~~~~~~~~
/tmp/gimlet/2078210/project/JarvisDev/Plugins/cordova-plugin-zeroconf/ZeroConf.swift:10:2: error: only classes that inherit from NSObject can be declared @objc
@objc(ZeroConf) class ZeroConf : CDVPlugin  {
~^~~~
/tmp/gimlet/2078210/project/JarvisDev/Plugins/cordova-plugin-zeroconf/ZeroConf.swift:15:19: error: method does not override any method from its superclass
    override func pluginInitialize() {
    ~~~~~~~~      ^
becvert commented 8 years ago

Hi @VittorioMobimentum Looks like the Swift config isn't right. Bridging-Header file missing maybe. I'd be happy if you or someone else could have a look at it as I'm not using PhoneGap and I won't be able to help right now. Thanks