cloudinary_ios: Could not build Objective-C module 'CLDCrypto'

Hi, I’m trying to build my iOS app via Nevercode, a continuous integration tool, and I use CocoaPods to integrate Cloudinary iOS SDK.

My repository connects with the integration tool, so to build the app I push the Workspace files, which includes my project and the Pods.xcodeproj

And I keep getting this:

.../Pods/Cloudinary/Cloudinary/Frameworks/CLDCrypto/iphoneos/CLDCrypto.framework/module.map:2:10: header '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/i
PhoneOS10.3.sdk/usr/include/CommonCrypto/CommonCrypto.h' not found

 header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/CommonCrypto/CommonCrypto.h"
                                                                                                                      ^

.../Pods/Cloudinary/Cloudinary/Utils/CLDCryptoUtils.swift:25:8: could not build Objective-C module 'CLDCrypto'

import CLDCrypto
       ^

It looks like the Pod doesn’t include the ‘CLDCrypto’ framework.

I’ve tried removing the pod, running ‘pod install’ to remove Cloudinary, I add the pod and install to add Cloudinary again, but any new file was added.

I also tried adding to my Project Settings -> General -> Linked Frameworks and Libraries the CLDCrypto.Framework, but I get the same error

I use the latest pod: ‘Cloudinary’, ‘~> 2.0’, and Xcode 8.3.3

Any thoughts on what it could be, or why my project can’t find the framework?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (1 by maintainers)

Most upvoted comments

Hi everyone!

I had this issue when I renamed Xcode.app to Xcode.8.3.3.app. After app name was renamed to Xcode.app and CLDCrypto was built successfully.

I think updating of CommonCrypto.h path in “/Pods/Cloudinary/Cloudinary/Frameworks/CLDCrypto/iphoneos/CLDCrypto.framework/module.map” can help.

@Brandogs For me also, I don’t have “/iPhoneOS10.3.sdk” path. I have only “/iPhoneSimulator11.1.sdk” path.

in this case, in module.map just change “/iPhoneOS10.3.sdk” to “/iPhoneSimulator11.1.sdk”, It will work fine.

“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/usr/include/CommonCrypto/CommonCrypto.h”

“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/usr/include/CommonCrypto/CommonRandom.h”

We are working on a more stable solution, but in the meantime there’s a workaround for those errors.

The required header files were created the first time Cloudinary was added to the pod file, so whichever target was used then - that is where the files will be. That directory should be something like /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/CommonCrypto/

Both headers files (commonCrypto.h and commonRandom.h) need to be manually copied to the directory of the current target (iPhoneOS11.0.sdk, most probably). After that just verify that the module.map file(s) points to that same target directory as well (or manually edit it if that’s not the case). This file is located in the project directory under all the targets used, e.g. ../Pods/Cloudinary/Cloudinary/Frameworks/CLDCrypto/iphonesimulator/CLDCrypto.framework/ and another copy may be under ../Pods/Cloudinary/Cloudinary/Frameworks/CLDCrypto/iphoneos/CLDCrypto.framework/. and so on.

Hope this helps, Nitzan

I had the same issue. It was triggered by updating Xcode from beta to GM Seed. It’s looking for something in the 10.3 SDK, but I’m building for iOS11

Had the same issue when updated to Xcode 9.2 and 2.0.4-rc1 fixed it

Hey Guys. We’ve just published a Release Candidate for our iOS library - 2.0.4-rc1. This RC includes support for Swift 4 and the removal of CLDCryptoModule. Could you please install it and let us know if you see any issues?

Hi @nitzanj I am trying to set up an old project on a new computer and don’t have this path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk or any like it. I only have the latest target (iPhoneOS11.1sdk) and a generic target.

Is there another way I can go about trying this workaround?