-
Notifications
You must be signed in to change notification settings - Fork 37
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 11.4 / Swift 5.2 crashes on parsing PublicKey in simulators and <= iOS 12 #23
Comments
Exactly same issue here. |
I've imported the project manually (without pods), and it works at the moment. |
…ency. As one of DP3T dependencies has a known issue when using Pod dependency manger (Kitura/BlueECC#23).
I saw a similar problem with Xcode 12.2 compiling for macOS. Strange thing was, it worked fine in Debug builds, but it crashed with builds for Profiling or Release. Mine is crashing when parsing the PublicKey, but otherwise looks to be the same core problem: guard let secKey = SecKeyCreateWithData(keyData as CFData,
[kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom,
kSecAttrKeyClass: kSecAttrKeyClassPublic] as CFDictionary,
&error) This looks like the relevant part of the stack trace:
I don't see the same "One of the two will be used" warning like the OP, but that definitely feels like a build issue. The comment about switching away from pods made me curious, so I switched from installing from a Podfile to using Package.swift, and that fixed the problem! Maybe it was some kind of library mismatch or something. Hope this helps if anyone else stumbles across the same issue. |
The following code crashes on Simulators and my iOS12.4 iPhone 6when built with xCode 11.4, but works ok on xCode 11.3.
Does not seem to crash on iOS 13.4.
let p256PrivateKey = try! ECPrivateKey.make(for: .prime256v1) print(p256PrivateKey.pemString) publicKey = try! p256PrivateKey.extractPublicKey() print(publicKey.pemString)
Error is happening at this line:
guard let secKey = SecKeyCreateWithData(keyData as CFData, [kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom, kSecAttrKeyClass: kSecAttrKeyClassPublic] as CFDictionary, &error)
Error:
objc[1049]: Class _TtGCs18_DictionaryStorageaSo11CFStringRefS0__$ is implemented in both /usr/lib/swift/libswiftCore.dylib (0x1c1d492d8) and /usr/lib/swift/libswiftCore.dylib (0x1c1d495e8). One of the two will be used. Which one is undefined. Fatal error: invalid unsafeDowncast
The text was updated successfully, but these errors were encountered: