Once you have your Swift package set up, adding TDLib as a dependency is as easy as adding it to the dependencies value of your Package.swift.
dependencies: [ .package(url: "https://github.com/oboupo/tdlib-spm.git", .upToNextMajor(from: "1.7.0")) ]
Sample of code can be found in official tdlib repo
Below are instructions for building
tdjson you will need to:
xcode-select --installor downloading it from Xcode website. It is not enough to install only command line developer tools to build
brew install gperf cmake coreutils
This may take a while, because TDLib will be built about 10 times.
Built framework will be store in
Other documentation can be found at https://github.com/tdlib/td/tree/master/example/ios.