Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between .tdb and .dylib in iOS (Xcode 7)

Tags:

xcode

ios

I am trying to add libsqlite3.dylib in my project using Xcode 7 beta. I searched in "Link Binary with Libraries", but I found a library like this, libsqlite3.tdb.
Is it any difference between .tdb and .dylib? Please describe the difference between these two and whether this will work on iOS 8 and lower.

enter image description here

like image 565
Kiran P Nair Avatar asked Jun 22 '15 12:06

Kiran P Nair


People also ask

What is .TBD iOS?

A TBD file is a text-based file used by Apple Xcode, a macOS IDE used to develop iOS and macOS apps. It contains information about a . DYLIB library, the location of the DYLIB library, and symbols.

How do I use TBD files?

If you cannot open your TBD file correctly, try to right-click or long-press the file. Then click "Open with" and choose an application. You can also display a TBD file directly in the browser: Just drag the file onto this browser window and drop it.


2 Answers

.dylib is the compiled binary that contains the machine code. .tdb is a text file akin to a cross-platform module map. I can only assume it's there so that you can write Swift code and link it against Unix libraries that are shared between Darwin / Linux. We'll know soon enough.

Here's the beginning of libssl.tdb

---
archs:           [ i386, x86_64 ]
platform:        macosx
install-name:    /usr/lib/libssl.0.9.8.dylib
current-version: 0.9.8
compatibility-version: 0.9.8
exports:         
  - archs:           [ i386, x86_64 ]
    symbols:         [ _BIO_f_ssl, _BIO_new_buffer_ssl_connect, _BIO_new_ssl, 
                       _BIO_new_ssl_connect, _BIO_ssl_copy_session_id, 
like image 109
ColemanCDA Avatar answered Sep 27 '22 18:09

ColemanCDA


To add .dylib go to your project targets -> Build Phases -> Link binary with libraries -> Click plus button -> Add Other -> press command + shift + g -> Enter "/Usr/lib" -> click Go -> Search "libz" -> Select from the list and click open.

like image 38
Milan Gupta Avatar answered Sep 27 '22 17:09

Milan Gupta