Khant Thu Linn
Khant Thu Linn

Reputation: 6133

Creating private cocoapods and use CommonCrypto

Currently, I am moving some of my codes to cocoapods so that our team can share. In one of my code,

I need to import like this. It is in CryptoProxy.h and CryptoProxy.m.

#import <CommonCrypto/CommonDigest.h>
#import <CommonCrypto/CommonHMAC.h>
#import <CommonCrypto/CommonCryptor.h>

I can still build and run locally. I can also lint lib.

pod lib lint WWAutoupdate.podspec --verbose

Problem is that when I lint spec,

pod spec lint WWAutoupdate.podspec --verbose

I got many errors like this. How shall I solve that? Do I need to import some kind of library?

- ERROR | [iOS] xcodebuild:  WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:81:62:

error: use of undeclared identifier 'CC_LONG' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:81:12: error: use of undeclared identifier 'kCCHmacAlgSHA1' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:91:24: error: use of undeclared identifier 'CC_SHA224_DIGEST_LENGTH' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:93:64: error: use of undeclared identifier 'CC_LONG' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:93:12: error: use of undeclared identifier 'kCCHmacAlgSHA224' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:103:24: error: use of undeclared identifier 'CC_SHA256_DIGEST_LENGTH' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:105:64: error: use of undeclared identifier 'CC_LONG' - ERROR | [iOS] xcodebuild: WWAutoupdate/WWAutoupdate/Classes/Library/Hawk/CryptoProxy.m:105:12: error:

Upvotes: 0

Views: 447

Answers (1)

al03
al03

Reputation: 144

Change all #import <CommonCrypto/*.h> to #import <CommonCrypto/CommonCrypto.h>.

Upvotes: 0

Related Questions