0

After Upgrading to xcode 7 getting below error, I tried adding both libraries also but it couldn't solve my issue. Tried to update pods also.

ld: file is universal (2 slices) but does not contain a(n) x86_64 slice: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk/usr/lib/system/libcommonCrypto.dylib file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk/usr/lib/system/libcommonCrypto.dylib' for architecture x86_64

whoan
  • 8,143
  • 4
  • 39
  • 48
Rohit
  • 39
  • 1
  • 6
  • Have you add libcommonCrypto.dylib add not? because you said i triend that means you added or not found? – Rushang Prajapati Dec 03 '15 at 10:37
  • Yes i have added libcommonCrypto it is there. – Rohit Dec 03 '15 at 11:58
  • ok check this link http://stackoverflow.com/questions/12402092/file-is-universal-three-slices-but-it-does-not-contain-an-armv7-s-slice-err – Rushang Prajapati Dec 03 '15 at 12:06
  • Why are you directly adding the `libcommonCrypto.dylib` instead of `Security.framework`? – zaph Dec 03 '15 at 13:42
  • @zaph, I have added Security.framework also its still same, but when i added libcommonCrypto.dylib manually i am getting"ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk/usr/lib/system/libcommonCrypto.dylib, file was built for unsupported file format ( 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): " – Rohit Dec 03 '15 at 16:29
  • @RushangPrajapati, i tried that solution earlier also it din work for me. – Rohit Dec 03 '15 at 16:30
  • You will need to **add** more information to the question, there is mention to "pods". All that is needed to use Common Crypto is to add the Security.framework and the needed imports. If you are adding these libraries manually as well there may well be a problem. Perhaps there is a problem with the "pods". – zaph Dec 03 '15 at 16:49
  • @rohit if you using "Pods" then not open .xcodeproj open the .xcworkspace file form project path – Rushang Prajapati Dec 04 '15 at 04:38
  • 1
    @RushangPrajapati yes i know this i am working on workspace only.anyway thanks to all of you i solved this – Rohit Dec 07 '15 at 12:05
  • @Rohit if you solved this then updated your answer it will help for other :) – Rushang Prajapati Dec 07 '15 at 12:31

1 Answers1

1

I have solved this problem by removing libCommonCrypto.dylib,libz.dylib from project and adding security.framework, javascript.framework to the project.

Rohit
  • 39
  • 1
  • 6