xcode 7.1 for iOS 9 missing libc++.dylib required for Objective C Realm Static Framework

我与影子孤独终老i 提交于 2019-12-05 03:27:19

I had the same problem. I found some kind of way around.

  1. Go to Build Phases > Link Binary with Librairies > + > Add other
  2. Once in the file selection window do "CMD"+Shift+G (Go to folder) and type /usr/lib/
  3. From /usr/lib you can add : libc++.dylib and more... Compile and have fun

This is a known issue in the Xcode 7 beta.

To work around this issue for now, please: Delete all references to .tbd files from either your linked libraries phase, or from the copied bundle resources phase (where they sometimes will be added). Add the library you want to link manually to the "Other Linker Flags" build settings, by adding the argument: -l<library_name> for each library you want to link (for example, add "-lsqlite3" (without quotes)).

For those who are curious, the .tbd files are new "text-based stub libraries", that provide a much more compact version of the stub libraries for use in the SDK, and help to significantly reduce its download size.

-- copy from link

finally, you can add -lc++ in this Other link Flags setting

I have same problem. I cannot find libc++.dylib through xcode but I found it using terminal.

You can copy or create a link to visible folder in xcode like /Users//Downloads.

Command below maybe help to fix the problem.

ln -s /usr/lib/libc++.dylib /Users/<your user>/Downloads/libc++.dylib

I had a similar issue with Realm the other week after the iOS 9 update. I know you already tried the method of going to build phases, add other, CMD + shift + G without success. However this was the method I used to locate libc++.dylib and I just checked it out again now and was able find it.

It is also worth mentioning that after you do manage to add libc++.dylib you may have build errors. In which case the fix I used was to go into your target's build settings and change Enable Bitcode to No.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!