Search code examples
swiftarchitecturearm64commoncrypto

Swift CommonCrypto Adding Error


module.map create files

Add the following code in the file,

module CommonCrypto [system] {
  header "/usr/include/CommonCrypto/CommonCrypto.h"
  link "CommonCrypto"
  export *
}

Bridging-Header file registration and

Search Paths and File Path registered in module.map

Build execution, error ...

ld: library not found for -lCommonCrypto for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I do not know :( Ask help Please!!


Solution

  • module CommonCrypto [system] { 
       header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h" 
       export * 
    }
    

    https://ungacy.atlassian.net/wiki/display/IOS/Importing+CommonCrypto+in+a+Swift+framework