{"id":17032949,"url":"https://github.com/up9cloud/ios-libtdjson","last_synced_at":"2025-04-12T12:53:19.869Z","repository":{"id":62457444,"uuid":"388427412","full_name":"up9cloud/ios-libtdjson","owner":"up9cloud","description":"Prebuilt [TDLib](https://github.com/tdlib/td) shared lib (libtdjson.dylib) for iOS and macOS","archived":false,"fork":false,"pushed_at":"2024-06-27T23:47:52.000Z","size":49,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T07:36:38.591Z","etag":null,"topics":["cocoapods","dylib","ios","libtdjson","macos","prebuilt","tdjson","tdlib","telegram","telegram-api"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/up9cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-22T10:48:49.000Z","updated_at":"2025-02-25T18:20:26.000Z","dependencies_parsed_at":"2024-06-14T19:54:12.550Z","dependency_job_id":null,"html_url":"https://github.com/up9cloud/ios-libtdjson","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fios-libtdjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fios-libtdjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fios-libtdjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fios-libtdjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up9cloud","download_url":"https://codeload.github.com/up9cloud/ios-libtdjson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571653,"owners_count":21126520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapods","dylib","ios","libtdjson","macos","prebuilt","tdjson","tdlib","telegram","telegram-api"],"created_at":"2024-10-14T08:31:07.895Z","updated_at":"2025-04-12T12:53:19.848Z","avatar_url":"https://github.com/up9cloud.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ios-libtdjson\n\n[![Version](https://img.shields.io/cocoapods/v/libtdjson.svg?style=flat)](https://cocoapods.org/pods/libtdjson)\n[![License](https://img.shields.io/cocoapods/l/libtdjson.svg?style=flat)](https://cocoapods.org/pods/libtdjson)\n[![Platform](https://img.shields.io/cocoapods/p/libtdjson.svg?style=flat)](https://cocoapods.org/pods/libtdjson)\n\n## Lib versions\n\n|  pod  |                                        tdlib                                          |\n| ----- | ------------------------------------------------------------------------------------- |\n| 0.4.2 | [1.8.31](https://github.com/tdlib/td/commit/8f19c751dc296cedb9a921badb7a02a8c0cb1aeb) |\n| 0.4.1 | [1.8.30](https://github.com/tdlib/td/commit/fab354add5a257a8121a4a7f1ff6b1b9fa9a9073) |\n| 0.3.0 | [1.8.7](https://github.com/tdlib/td/commit/a7a17b34b3c8fd3f7f6295f152746beb68f34d83)  |\n| 0.2.2 | [1.8.1](https://github.com/tdlib/td/commit/92c2a9c4e521df720abeaa9872e1c2b797d5c93f)  |\n| 0.2.1 | [1.7.9](https://github.com/tdlib/td/commit/7d41d9eaa58a6e0927806283252dc9e74eda5512)  |\n| 0.2.0 | [1.7.0](https://github.com/tdlib/td/tree/v1.7.0)                                      |\n\n## Supported architectures\n\n|      Platform      | Architecture |     |\n| ------------------ | ------------ | --- |\n| iOS                | armv7        | ❌   |\n|                    | armv7s       | ❌   |\n|                    | arm64        | ✅   |\n| iOS simulator      | i386         | ❌   |\n|                    | x86_64       | ✅   |\n|                    | arm64 (M1↑)  | ✅   |\n| macOS              | i386         | ❌   |\n|                    | x86_64       | ✅   |\n|                    | arm64 (M1↑)  | ✅   |\n| watchOS            | armv7k       | ❌   |\n|                    | arm64_32     | ❌   |\n|                    | arm64        | ❌   |\n| watchOS simulator  | x86_64       | ❌   |\n|                    | arm64        | ❌   |\n| tvOS               | arm64        | ❌   |\n| tvOS simulator     | x86_64       | ❌   |\n|                    | arm64        | ❌   |\n| visionOS           | arm64        | ❌   |\n| visionOS simulator | x86_64       | ❌   |\n|                    | arm64        | ❌   |\n\n## Installation\n\n### CocoaPods\n\nlibtdjson is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod 'libtdjson'\n```\n\nor add it to your .podspec file:\n\n```ruby\nPod::Spec.new do |s|\n  s.dependency 'libtdjson'\nend\n```\n\n### Use it as module (iOS, swift)\n\nBecause 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:\n\n- Download example `headers` and `module.modulemap`\n\n```bash\ncurl -SLO https://github.com/up9cloud/ios-libtdjson/releases/download/v0.2.2/cocoapod_modulemap.tar.gz\nmkdir include\ntar xzf cocoapod_modulemap.tar.gz -C include\n\n# Edit files to whatever you want, e.q. change the module name or remove export symbols you don't need\n```\n\n- Add include path and link lib, e.q.\n\n```ruby\nPod::Spec.new do |s|\n  s.pod_target_xcconfig = {\n    'SWIFT_INCLUDE_PATHS' =\u003e '${PODS_TARGET_SRCROOT}/include',\n    'OTHER_LDFLAGS' =\u003e '-ltdjson',\n  }\nend\n```\n\n- Use it\n\n```swift\nimport libtdjson\nfunc create() -\u003e Int {\n    return Int(bitPattern: libtdjson.td_json_client_create()!)\n}\n// ... (more usages at ./example/*)\n```\n\n### Carthage\n\nTODO:\n\n### Manually\n\nDownload prebuilt files from `Release`, then do whatever you want.\n\n## Q\u0026A\n\n\u003e An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain,code=1):\n\nThe app will crash if identification name of .dylib isn't correct\n\n```bash\n# check id\notool -D libtdjson.dylib\n\n# fix id\ninstall_name_tool -id @rpath/libtdjson.dylib libtdjson.dylib\n```\n\n## TODO\n\n- [ ] Package static lib for App Store\n- [ ] Support [Carthage](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile)\n- [x] Support M1 (Apple Silicon) - migrate to XCFramework, see [PR 1620](https://github.com/tdlib/td/pull/1620)\n\n## Dev memo\n\n### Bump the TDLib version\n\n- Modify the version for git checkout in `./build.sh`\n- Update the `Lib versions` part in `./README.md`\n- Git commit (message example: `bump td to vx.x.x`)\n- Git add tag (`git tag vx.x.x`, the tag version should be the version on cocoapod)\n- Push with tags (`git push \u0026\u0026 git push --tags`)\n- Wait for CI task\n\n\u003e If the CI build failed, need manually do `pod trunk push`...\n\n```bash\nexport GITHUB_REF=refs/tags/\u003cthe version\u003e\npod trunk push --allow-warnings libtdjson.podspec\npod trunk push --allow-warnings flutter_libtdjson.podspec\n```\n\n\u003e Find pod info\n\n```bash\npod trunk info libtdjson\n```\n\n\u003e what if need to revert the tag...\n\n```bash\nversion=\u003cthe version tag\u003e\ngit push --delete origin $version\ngit tag -d $version\ngit add .\ngit commit -m \"...\"\ngit tag $version\ngit push \u0026\u0026 git push --tags\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fios-libtdjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup9cloud%2Fios-libtdjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fios-libtdjson/lists"}