4

I know how to create .dylib files. I used to use Xcode and then Real studio.

But I am not sure now how to create the .tbd files any help or links that can be shared.

I have heard they are much lighter in size and apple has replaced all of its static libs with .tbd

:) Cheers

Rein rPavi
  • 3,368
  • 4
  • 22
  • 32
  • To be clear, the benefits of tbd files are somewhat slim for third-party developers. The actual dynamic libraries that the tbd describes still needs to be shipped with the product binary, – zneak Aug 10 '18 at 15:38

1 Answers1

4

On my High Sierra system with XCode 10 I get warnings about outdated .tbd files like

ld: warning: text-based stub file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.tbd and library file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib are out of sync. Falling back to library file for linking.

whenn running c++ from the command line. So I dived into it and found the 'tapi' utility to create .tbd files from header files or dylibs. It is hidden deeply in Xcode, the path may be different in other versions, but running it like

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/tapi stubify libGL.dylib

did the trick for me, generating new stub files with current uuids. You possibly need to disable the system integrity protection (see Operation Not Permitted when on root - El Capitan (rootless disabled)) to put them in the system area then, though.

DeDry
  • 41
  • 2