Xcode7 升級(jí)后 在引入動(dòng)態(tài)庫的時(shí)候 發(fā)現(xiàn).tbd 取代了 .dylib出現(xiàn)在我們眼前
.dylib 去哪了
事實(shí)上.dylib?還在原來的位置,而且我們也可以通過解析.tbd?來找到他們,要使用原來的.dylib文件可以這樣做:
選擇"Add Other"
按下"CMD"+Shift+G"
輸入"/usr/lib"
.tbd 是什么
經(jīng)過苦苦的搜索之后,還是沒有(!!!)任何有價(jià)值的文獻(xiàn),只在蘋果開發(fā)者論壇中有一段來自蘋果官方的回答:
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.
簡單說.tbd?又是和蘋果壓縮 iOS 系統(tǒng)和應(yīng)用體積的政策的產(chǎn)物。
.tbd 出錯(cuò)了
如果你在使用.tbd?時(shí)出現(xiàn)類似這樣的的錯(cuò)誤:
warning: skipping file ‘/Users/me/xcode7/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/lib/libz.tbd’ (unexpected file type ‘text’ in Frameworks & Libraries build phase)”
請(qǐng)參考下面的解決辦法:
? ? ? ?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)).
也就是說:
刪除所有 .tbd?引用,不論Link Binary With Libraries 中添加的??還是 copy?bundle resources
在 Build Settings?=> Other Linker Flags?中手動(dòng)將每一個(gè)你要導(dǎo)入的庫以-l"<library_name>"的形式添加,例如你要導(dǎo)入sqlite3?則添加-l"sqlite3"。
---------------------
作者:低調(diào)攻城獅
來源:CSDN
原文:https://blog.csdn.net/zbh491163747/article/details/51441602
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!