Posts

Post marked as unsolved
71 Views

Embed and sign option in a framework project

Greetings! I encounter an issue when try building an xcframework from a framework project with Embed and Sign option enabled for the project's pods. When I'm trying to use the xcframework in the final app I get a compile errors: No such module framework's dependency from pod Failed to build module framework-module-name from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced. The goal is to get the xcframework contains all the required things. To be able simply add the xcframework to any app without any additional dependencies. Question: Does the option "Embed and Sign" include all of the libraries into the main project build ?
Asked
by yivkin.
Last updated .
Post marked as unsolved
185 Views

Closure definition mismatch

Greetings!  I try to port a framework written in Swift 5 to Swift 4.2. And encounter syntax error I can't understand. Code:   private static func ccAESKeyWrap(         rawKey: Data,         keyEncryptionKey: Data) - (data: Data?, status: Int32) {         let alg = CCWrappingAlgorithm(kCCWRAPAES)         var wrappedKeyLength: size_t = CCSymmetricWrappedSize(alg, rawKey.count)         var wrappedKey = Data(count: wrappedKeyLength)         let status = wrappedKey.withUnsafeMutableBytes { (wrappedKeyBytes: UnsafeMutablePointer) in             rawKey.withUnsafeBytes { (rawKeyBytes: UnsafePointer) in                 keyEncryptionKey.withUnsafeBytes { (keyEncryptionKeyBytes: UnsafePointer) - Int32 in                     guard                         let wrappedKeyBytes = wrappedKeyBytes.bindMemory(to: UInt8.self).baseAddress,                         let rawKeyBytes = rawKeyBytes.bindMemory(to: UInt8.self).baseAddress,                         let keyEncryptionKeyBytes = keyEncryptionKeyBytes.bindMemory(to: UInt8.self).baseAddress                     else {                         return Int32(kCCMemoryFailure)                     }                     return CCSymmetricKeyWrap(                         alg,                         CCrfc3394_iv,                         CCrfc3394_ivLen,                         keyEncryptionKeyBytes,                         keyEncryptionKey.count,                         rawKeyBytes, rawKey.count,                         wrappedKeyBytes, &wrappedKeyLength)                 }             }         }         guard status == kCCSuccess else {             return (nil, status)         }         wrappedKey.removeSubrange(wrappedKeyLength..wrappedKey.count)         return (wrappedKey, status)     } On string  keyEncryptionKey.withUnsafeBytes { (keyEncryptionKeyBytes: UnsafePointer) - Int32 in I got the error: Cannot convert value of type '(UnsafePointer) - Int32' to expected argument type '(UnsafePointer) - '_  Could anyone tell me what do I do wrong ?
Asked
by yivkin.
Last updated .
Post marked as unsolved
85 Views

Key algoriyhm detection

Greetings! Is there any way how I can get a key's algorithm imported via the SecSertificateCopyPublicKey function in the iOS 10.3 compatible way ?
Asked
by yivkin.
Last updated .