Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 11 error message: Could not build Objective-C module 'CommonCrypto' #4

Closed
alijaza opened this issue Sep 21, 2017 · 9 comments
Closed

Comments

@alijaza
Copy link

alijaza commented Sep 21, 2017

It looks like my module.map is pointing to iOS 10.3 SDK, which is not found:

module CommonCrypto [system] {
	header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/CommonCrypto/CommonCrypto.h"
	header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/CommonCrypto/CommonRandom.h"
	export *
	}
@skreis
Copy link

skreis commented Sep 21, 2017

@sgl0v first, thanks for providing this library – it's been quite handy for the past several months of use!

I integrate into my project via Cocoapods and find that when I explore the Pods/SCrypto/Frameworks/iphoneos/CommonCrypto.framework/module.map file, I too see the same as above.

I also notice the modulemap.sh and other scripts used to build this project. Initially, was there a specific reason to point at a particular SDK's crypto vs using the symlink?

In other words, would the following always be valid (example only for iPhoneOS below)?

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

@sgl0v
Copy link
Owner

sgl0v commented Sep 22, 2017

@alijaza @skreis There is a module.map file generated by the next script. Unfortunately the module map file is not updated on pod install. Please, remove the Pods folder & run the pod install from command line.

@skreis
Copy link

skreis commented Sep 26, 2017

@sgl0v thank you. I could have sworn I followed those very steps when I initially bumped into this without success.

On subsequent attempt, I followed your instructions again and it worked as expected. 👍

@sgl0v sgl0v closed this as completed Oct 4, 2017
@alijaza
Copy link
Author

alijaza commented Nov 1, 2017

@sgl0v I still get the wrong version of iphonesimulator in my module.map file, even when deleting the Pods folder and re-installing (I see iPhoneSimulator11.0.sdk instead of iPhoneSimulator11.1.sdk). Can you explain where the script grabs this version number when constructing module.map?

@rredpoppy
Copy link

Same here, still the wrong version of simulator

@sgl0v
Copy link
Owner

sgl0v commented Nov 2, 2017

@alijaza here is the command used to get the SDK path: xcrun --sdk iphonesimulator --show-sdk-path

@mahgolfa
Copy link

mahgolfa commented Jul 2, 2018

I got the same issue by updating Xcode from 9.3 to 9.4 but simply deleting pods folder and running pod install worked for me :D

@wazzah-marham
Copy link

Deleting Pods file and re-running pod install didn't help in my case.

@zachin1996
Copy link

So Guys, i know its bit late but i got this issue and i have resolved this.
This error was coming due to the wrong path in Xcode. Recently i have downloaded Xcode and it was located in download rather than in Application. The error in Module.modulemap was showing the Path from Application/Xcode which was not available, i just moved the Xcode from Downloads to Application and ran the application and it worked!!!!. Hope this helps someone....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants