tapi-tbdv4(1) TAPI TBD Version 4 Format Documentation tapi-tbdv4(1)

tbd - Text Based Dynamic Library Stub

TAPI both generates and operates over text based stub files (.tbd). These files are a textual, human readable representation of Mach-O dynamic libraries (dylib) holding properties needed to resolve static link time dependencies including the same exported symbols as the original dynamic library. Format versions 1 - 4 were represented in YAML.

tbd-version: <int>

Specifies the TBD file version. The only supported version is 4.

install-name: <path>

Specifies the install name of the dylib. This key is part of the LC_ID_DYLIB load command in the Mach-O format.

targets: <array>

Specifies the list of supported architecture/platform tuples. The following platform identifiers are supported: macos, maccatalyst, ios, ios-simulator, tvos, tvos-simulator, watchos, watchos-simulator.

parent-umbrella: <section>

Specifies the parent umbrella of the dynamic library, if applicable. This key is equivalent to the LC_SUB_FRAMEWORK load command in the Mach-O format. The section contains an array of targets and its associated umbrella name.

allowable-clients: <section>

Specifies the allowable clients that are permitted to link against the dynamic library file. This key is equivalent to the LC_SUB_CLIENT load command in the Mach-O format. The section contains an array of targets and its associated list of client names.

reexported-libraries: <section>

Specifies a list of reexported libraries. This key is equivalent to the LC_REEXPORT_DYLIB load command in the Mach-O format. The section contains an array of targets and its associated list of reexported library names.

flags: <array>

Specifies the flags of the dylib.
Valid flags are: flat_namespace and not_app_extension_safe. flat_namespace is deprecated, but there are still some old binaries around on macOS that depend on flat namespace linking. The default is two level namespace linking. not_app_extension_safe indicates that the library is not safe to be used in an Application Extension.

current-version: <version>

Specifies the current version of the dynamic library file. The default value is 1.0 if not specified. This key is part of the LC_ID_DYLIB load command in the Mach-O format.

compatibility-version: <version>

Specifies the compatibility version of the dynamic library file. The default value is 1.0 if not specified. This key is part of the LC_ID_DYLIB load command in the Mach-O format.

swift-abi-version: <int>

Specifies the Swift ABI version the dynamic library file was compiled with. The default value is 0 if not specified. The Swift ABI version is encoded in the Objective-C image section.

exports: <section>

Specifies the regular exported symbol sections. The section contains an array of targets and its associated list of symbol names.

re-exports: <section>

Specifies the exported symbol sections not defined in the library itself, but coming from a different library instead. The section contains an array of targets and its associated list of symbol names.

undefineds: <section>

Specifies the undefined symbol sections which are only used for flat address space libraries. The section contains an array of targets and its associated list of symbol names.

objc-classes: <array>

Specifies the list of exported, re-exported, or undefined Objective-C class names.

objc-eh-types: <array>

Specifies the list of exported, re-exported, or undefined Objective-C class exception type names.

objc-ivars: <array>

Specifies the list of exported, re-exported, or undefined Objective-C instance variable names.

weak-symbols: <array>

Specifies the names of weak defined symbols for exported symbol sections or weak referenced symbols for undefined symbol sections.

thread-local-symbols: <array>

Specifies the symbol name of thread local exports.

--- !tapi-tbd
tbd-version: 4
targets: [ arm64-macos, x86_64-macos, x86_64-maccatalyst ]
flags: [ flat_namespace ]
install-name: /usr/lib/libc.dylib
current-version: 1.2.3
compatibility-version: 1.1
swift-abi-version: 5
parent-umbrella:

- targets: [ arm64-macos, x86_64-macos, x86_64-maccatalyst ]
umbrella: System
allowable-clients:

- targets: [ arm64-macos, x86_64-macos, x86_64-maccatalyst ]
clients: [ ClientA, ClientB ]
reexported-libraries:

- targets: [ x86_64-macos, x86_64-maccatalyst]
library: [ /System/Library/Frameworks/Foo.framework/Foo ]
- targets: [ arm64-macos]
library: [ /System/Library/Frameworks/Bar.framework/Bar ]
exports:

- targets: [ x86_64-macos ]
symbols: [ _symA ]
objc-classes: []
objc-eh-types: []
objc-ivars: []
weak-symbols: []
thread-local-symbols: []
- targets: [ x86_64-maccatalyst ]
symbols: [ _symB ]
- targets: [ x86_64-macos, x86_64-maccatalyst ]
symbols: [ _symAB ]
re-exports:

- targets: [ arm64-macos ]
symbols: [ _symC ]
objc-classes: []
objc-eh-types: []
objc-ivars: []
weak-symbols: []
thread-local-symbols: []
undefineds:

- targets: [ arm64-macos ]
symbols: [ _symD ]
objc-classes: []
objc-eh-types: []
objc-ivars: []
weak-symbols: []
thread-local-symbols: []

tapi(1), tapi-tbdv5(1), ld(1), Mach-O(5)

2023-03-08 Darwin