- Install Rust to your OS
- git clone https://github.com/tonlabs/TON-SDK
- cd ./TON-SDK
- cargo update
- cargo build --release
- macOS : copy or create symlink of file ./TON-SDK/target/release/libton_client.dylib to /usr/local/lib/libton_client.dylib Linux : copy or create symlink of file ./TON-SDK/target/release/libton_client.so to /usr/lib/libton_client.so
- Create pkgConfig file : macOS :
prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: ton_client
Description: ton_client
Version: 1.0.0
Cflags: -I${includedir}
Libs: -L${libdir} -lton_client
Linux:
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: ton_client
Description: ton_client
Version: 1.0.0
Cflags: -I${includedir}
Libs: -L${libdir} -lton_client
Please, set custom working directory to project folder for your xcode scheme. This is necessary for the relative path "./" to the project folders to work. You may change it with the xcode edit scheme menu. Or inside file path_to_ton_sdk/.swiftpm/xcode/xcshareddata/xcschemes/TonClientSwift.xcscheme set to tag "LaunchAction" absolute path to this library with options: useCustomWorkingDirectory = "YES" customWorkingDirectory = "/path_to_ton_sdk"