Prebuilt [TDLib](https://github.com/tdlib/td) shared lib (libtdjson.dylib) for iOS and macOS
MIT License
pod | tdlib |
---|---|
0.4.2 | 1.8.31 |
0.4.1 | 1.8.30 |
0.3.0 | 1.8.7 |
0.2.2 | 1.8.1 |
0.2.1 | 1.7.9 |
0.2.0 | 1.7.0 |
Platform | Architecture | |
---|---|---|
iOS | armv7 | ❌ |
armv7s | ❌ | |
arm64 | ✅ | |
iOS simulator | i386 | ❌ |
x86_64 | ✅ | |
arm64 (M1↑) | ✅ | |
macOS | i386 | ❌ |
x86_64 | ✅ | |
arm64 (M1↑) | ✅ | |
watchOS | armv7k | ❌ |
arm64_32 | ❌ | |
arm64 | ❌ | |
watchOS simulator | x86_64 | ❌ |
arm64 | ❌ | |
tvOS | arm64 | ❌ |
tvOS simulator | x86_64 | ❌ |
arm64 | ❌ | |
visionOS | arm64 | ❌ |
visionOS simulator | x86_64 | ❌ |
arm64 | ❌ |
libtdjson is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'libtdjson'
or add it to your .podspec file:
Pod::Spec.new do |s|
s.dependency 'libtdjson'
end
Because this pod only provide .dylib files (to prevent module name conflicts and keep it simplest!), if you want to use it as module (e.q. on iOS with swift), you have to add some necessary files:
headers
and module.modulemap
curl -SLO https://github.com/up9cloud/ios-libtdjson/releases/download/v0.2.2/cocoapod_modulemap.tar.gz
mkdir include
tar xzf cocoapod_modulemap.tar.gz -C include
# Edit files to whatever you want, e.q. change the module name or remove export symbols you don't need
Pod::Spec.new do |s|
s.pod_target_xcconfig = {
'SWIFT_INCLUDE_PATHS' => '${PODS_TARGET_SRCROOT}/include',
'OTHER_LDFLAGS' => '-ltdjson',
}
end
import libtdjson
func create() -> Int {
return Int(bitPattern: libtdjson.td_json_client_create()!)
}
// ... (more usages at ./example/*)
TODO:
Download prebuilt files from Release
, then do whatever you want.
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain,code=1):
The app will crash if identification name of .dylib isn't correct
# check id
otool -D libtdjson.dylib
# fix id
install_name_tool -id @rpath/libtdjson.dylib libtdjson.dylib
./build.sh
Lib versions
part in ./README.md
bump td to vx.x.x
)git tag vx.x.x
, the tag version should be the version on cocoapod)git push && git push --tags
)If the CI build failed, need manually do
pod trunk push
...
export GITHUB_REF=refs/tags/<the version>
pod trunk push --allow-warnings libtdjson.podspec
pod trunk push --allow-warnings flutter_libtdjson.podspec
Find pod info
pod trunk info libtdjson
what if need to revert the tag...
version=<the version tag>
git push --delete origin $version
git tag -d $version
git add .
git commit -m "..."
git tag $version
git push && git push --tags