becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

remove depenency on swift plugin #102

Open phatpaul opened 1 year ago

phatpaul commented 1 year ago

see #101

I tested this and it works on iOS. I don't think it should affect Android at all, but I'll check it.

But I did get the error error: Value for SWIFT_VERSION cannot be empty. but then I manually set the Swift Version in XCode and it worked. Not sure why <preference name="SwiftVersion" value="4.0" /> is not taking effect. Maybe a bug in cordova?

emcniece commented 1 year ago

Possibly this? https://forum.ionicframework.com/t/ios-build-issue-value-for-swift-version-cannot-be-empty/186855/3

<preference name="UseSwiftLanguageVersion" value="4" />
phatpaul commented 1 year ago

Well, it worked fine this time I did a fresh build from scratch. If it works for you too then I'd say it's good.

It looks like UseSwiftLanguageVersion was just for the old plugin cordova-plugin-add-swift-support. The cordova-ios native feature uses SwiftVersion.

Here's an example of another plugin that did this same thing: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio/pull/279/files

BTW, there's some chance of conflicting swift versions with workaround described here: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio/issues/342