CocoaMQTT
CocoaMQTT copied to clipboard
XCFramework support
When exporting this library as a .xcframework
users will get errors inside inside .swiftinterface file
when including it in the project:
The name of the type/class (CocoaMQTT) and the module (CocoaMQTT) are the same so they clash in the .swiftinterface file
. Compiler thinks that all the types are under CocoaMQTT class, not under the CocoaMQTT module => limitation where if a module and a type have the same name, as usage is assumed to be the type first. One of the simpler ways of avoiding this is to rename the CocoaMQTT
class to something else. This would however be the breaking change.
Similar issue: https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1601
Hi, I guess you want to call swift method in OC language?
Hi, no, using CocoaMQTT in Swift project, the issue is when you want to export this library as a .xcframework
and embed it as such in the project. These ⬆️ are the errors that pop up since the class name (CocoaMQTT) is the same as the library name (CocoaMQTT).
I think the quickest way is change the class name from (CocoaMQTT) to (project)CocoaMQTT or something else.
Yeah, not sure about naming conventions on this project so I guess it's anything that works :)
I see there is a CocoaMQTT5
class for the v5 of the protocol, maybe the original one which is used for the 3.1.1. could be renamed the CocoaMQTT3
?
This is also now represented as a warning in Xcode. https://github.com/apple/swift/issues/56573
Any plans with this?