-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode preview fails to build with errors #101
Comments
Filed feedback FB9873153 with Apple on Xcode 13.2.1 about these errors in Xcode Preview. |
One thing which might be worthwhile adding to the feedback is NIOSSL is conditional added to the MQTTNIO target as a dependency based on platform ie it is only used for macOS, and Linux and shouldn't be linked with the iOS target. I control this via the following line in the Package.swift .product(name: "NIOSSL", package: "swift-nio-ssl", condition: .when(platforms: [.linux, .macOS])), |
Your intuition is spot-on, my friend!
I forked the repo and removed the conditional platform NOISSL product, and
the Xcode preview worked fine. I will add this data point to the Apple
Feedback and hopefully that will help with a resolution.
On February 1, 2022 at 11:00:31 PM, Adam Fowler ***@***.***) wrote:
.product(name: "NIOSSL", package: "swift-nio-ssl", condition:
.when(platforms: [.linux, .macOS])),
|
You will need the condition when building a release. Apparently signing applications that include NIOSSL is problematic. See #19 |
The link errors are coming from some blocks of code in mqtt-nio that are wrapped in @adam-fowler Is that updated |
@drmarkpowell can you add the details about the |
included in the feedback: copied the comment from @obriensp and linked to this issue. Thanks! |
The fix is now in release 2.5.3 |
Describe the bug
Adding mqtt-nio dependency to iOS project breaks SwiftUI Previews
To Reproduce
Steps to reproduce the behavior:
Undefined symbol: nominal type descriptor for NIOSSL.NIOSSLCertificate
Undefined symbol: nominal type descriptor for NIOSSL.NIOSSLClientTLSProvider
Undefined symbol: NIOSSL.NIOSSLCertificate.toDERBytes() throws -> [Swift.UInt8]
Undefined symbol: static NIOSSL.NIOSSLCertificate.fromPEMFile(Swift.String) throws -> [NIOSSL.NIOSSLCertificate]
Undefined symbol: type metadata accessor for NIOSSL.NIOSSLContext
Undefined symbol: nominal type descriptor for NIOSSL.TLSConfiguration
Undefined symbol: protocol conformance descriptor for NIOSSL.NIOSSLClientTLSProvider : NIOCore.NIOClientTLSProvider in NIOSSL
Undefined symbol: type metadata accessor for NIOSSL.NIOSSLCertificate
Undefined symbol: NIOSSL.NIOSSLContext.__allocating_init(configuration: NIOSSL.TLSConfiguration) throws -> NIOSSL.NIOSSLContext
Undefined symbol: static NIOSSL.TLSConfiguration.makeClientConfiguration() -> NIOSSL.TLSConfiguration
Undefined symbol: NIOSSL.NIOSSLClientTLSProvider.init(context: NIOSSL.NIOSSLContext, serverHostname: Swift.String?, customVerificationCallback: (([NIOSSL.NIOSSLCertificate], NIOCore.EventLoopPromise<NIOSSL.NIOSSLVerificationResult>) -> ())?) throws -> NIOSSL.NIOSSLClientTLSProvider
Expected behavior
mqtt-nio builds and runs fine in the iOS simulator and on a real iOS device but breaks previews in Xcode...the preview simulator fails with errors on the build.
Context (please complete the following information):
Additional context
I am filing a feedback with Apple as well, as it's equally likely that it's their tool that's broken as the code in mqtt-nio builds and run fine outside of Xcode Preview.
The text was updated successfully, but these errors were encountered: