SweetHMAC icon indicating copy to clipboard operation
SweetHMAC copied to clipboard

CommonCrypto not validate in SweetHMAC.podspec

Open kingiol opened this issue 9 years ago • 2 comments

My cocoapods version is 0.39.0

when I use pod validate SweetHMAC.podspec

pod spec lint SweetHMAC.podspec

I got these errors:

-> SweetHMAC (1.1)
- ERROR | xcodebuild: Returned an unsuccessful exit code.
- WARN  | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:32:8: warning: file 'SweetHMAC.swift' is part of module 'CommonCrypto'; ignoring import
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:79:23: error: use of undeclared type 'CCHmacAlgorithm'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:104:19: error: use of unresolved identifier 'CC_MD5_DIGEST_LENGTH'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:107:19: error: use of unresolved identifier 'CC_SHA1_DIGEST_LENGTH'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:110:19: error: use of unresolved identifier 'CC_SHA224_DIGEST_LENGTH'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:113:19: error: use of unresolved identifier 'CC_SHA256_DIGEST_LENGTH'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:116:19: error: use of unresolved identifier 'CC_SHA384_DIGEST_LENGTH'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:119:19: error: use of unresolved identifier 'CC_SHA512_DIGEST_LENGTH'
- ERROR | xcodebuild:  SweetHMAC/SweetHMAC/Source/SweetHMAC.swift:169:5: error: use of unresolved identifier 'CCHmac'

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 9 errors and 1 warning.

kingiol avatar Dec 06 '15 15:12 kingiol

Unfortunately CommonCrypto lib isn't exposed to Swift interface directly, there some necessary extra work to make this working natively for Swift without create wrappers or ports.

Maybe in newer version of Xcode, there is a better way to do that and I'll investigate and implement soon possible to make SweetHMAC working with zero config in CocoaPods.

Thanks for your report.

jancassio avatar Dec 07 '15 10:12 jancassio

Ops, I closed by accident. Reopening....

jancassio avatar Dec 07 '15 10:12 jancassio