emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.59k stars 418 forks source link

Xcode 13 - 'FoundationConnection' is inaccessible due to 'internal' protection level' #393

Closed LucaKaufmann closed 2 years ago

LucaKaufmann commented 2 years ago

On the latest master version, Xcode 13 throws the error 'FoundationConnection' is inaccessible due to 'internal' protection level'. Does the FoundationConnection have to be marked as public as well?

public enum CocoaMQTTError: Error {
    @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    **enum FoundationConnection: Error {**
        case closed(URLSessionWebSocketTask.CloseCode)
    }

    case invalidURL
    case readTimeout
    case writeTimeout
}
leeway1208 commented 2 years ago

Hi , My Xcode 13 does not throw the error you showed. I downloaded project and tested successfully. But FoundationConnection be marked as public also runs well too. :)

hoangtung31 commented 2 years ago

I have the same issue as @LucaKaufmann

LucaKaufmann commented 2 years ago

I've been able to reproduce this error in 2 separate Projects using the CocoaMQTT package, so I opened PR #396 that should fix this

LucaKaufmann commented 2 years ago

PR was merged into master 👍