{"id":17032952,"url":"https://github.com/up9cloud/flutter_libtdjson","last_synced_at":"2025-04-12T12:52:01.509Z","repository":{"id":56833896,"uuid":"383388327","full_name":"up9cloud/flutter_libtdjson","owner":"up9cloud","description":"A flutter plugin for TDLib JSON interface, ffi binding.","archived":false,"fork":false,"pushed_at":"2024-07-02T23:58:49.000Z","size":319,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T07:36:29.869Z","etag":null,"topics":["android","ffi","flutter","flutter-plugin","ios","libtdjson","macos","tdjson","tdlib","telegram","telegram-api"],"latest_commit_sha":null,"homepage":"","language":"Dart","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":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-06T08:01:11.000Z","updated_at":"2024-07-02T23:58:52.000Z","dependencies_parsed_at":"2022-09-08T07:41:48.809Z","dependency_job_id":null,"html_url":"https://github.com/up9cloud/flutter_libtdjson","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fflutter_libtdjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fflutter_libtdjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fflutter_libtdjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up9cloud%2Fflutter_libtdjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up9cloud","download_url":"https://codeload.github.com/up9cloud/flutter_libtdjson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571558,"owners_count":21126519,"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":["android","ffi","flutter","flutter-plugin","ios","libtdjson","macos","tdjson","tdlib","telegram","telegram-api"],"created_at":"2024-10-14T08:31:10.143Z","updated_at":"2025-04-12T12:52:01.472Z","avatar_url":"https://github.com/up9cloud.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_libtdjson\n\n![Build Status](https://github.com/up9cloud/flutter_libtdjson/actions/workflows/main.yml/badge.svg)\n[![Pub Version](https://img.shields.io/pub/v/libtdjson)](https://pub.dev/packages/libtdjson)\n[![Pub Likes](https://img.shields.io/pub/likes/libtdjson)](https://pub.dev/packages/libtdjson/score)\n[![Pub Points](https://img.shields.io/pub/points/libtdjson)](https://pub.dev/packages/libtdjson/score)\n[![popularity](https://img.shields.io/pub/popularity/libtdjson)](https://pub.dev/packages/libtdjson/score)\n\nA flutter plugin for [TDLib JSON interface](https://github.com/tdlib/td#using-from-other-programming-languages), ffi binding.\n\n## Lib versions\n\n| package | td version                            |\n| ------- | ------------------------------------- |\n| 0.2.1   | 1.8.31 (Android, iOS, macOS)          |\n| 0.2.0   | 1.8.30 (Android, iOS, macOS)          |\n| 0.1.4   | 1.8.1  (Android, iOS, macOS)          |\n| 0.1.3   | 1.7.9  (Android, iOS, macOS)          |\n| 0.1.2   | 1.7.0  (Android), latest (iOS, macOS) |\n\n## Supported architectures\n\nMake sure you are using supported one\n\n| Platform         | Architecture |     |\n| ---------------- | ------------ | --- |\n| Android          | armeabi-v7a  | ✅   |\n|                  | arm64-v8a    | ✅   |\n| Android emulator | x86          | ✅   |\n|                  | x86_64       | ✅   |\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\n## Installation\n\n- Update `pubspec.yaml`:\n\n  ```yml\n  dependencies:\n    libtdjson: ^0.2.1\n  ```\n\n- If you want to build android, you have to add envs for github maven, see `./android/build.gradle`\n\n  ```bash\n  export GITHUB_ACTOR=\u003cusername\u003e\n  export GITHUB_TOKEN=\u003cpersonal access token\u003e\n  ```\n\n- If you want to set `tdlibParameters.database_directory` outside work dir, make sure you request the storage permission, e.q. `android/app/src/main/AndroidManifest.xml`\n\n  ```xml\n  \u003cmanifest\u003e\n    \u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/\u003e\n    \u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/\u003e\n  \u003cmanifest/\u003e\n  ```\n\n- If you want to build macos, have to set network permission in `./macos/Runner/*.entitlements` files\n\n  ```xml\n  \u003cdict\u003e\n      \u003ckey\u003ecom.apple.security.network.client\u003c/key\u003e\n      \u003ctrue/\u003e\n  \u003c/dict\u003e\n  ```\n\n## Dev memo\n\n### Bump TDLib version\n\n- Bump the td version of [android-libtdjson](https://github.com/up9cloud/android-libtdjson)\n- Bump the android dependency version in `./android/build.gradle`\n- Run `./example` for android\n\n  ```bash\n  cd ./example\n  flutter run -d emulator-5554\n  ```\n\n- Bump the td version of [ios-libtdjson](https://github.com/up9cloud/ios-libtdjson)\n- Bump the macos dependency version in `./macos/libtdjson.podspec` (s.dependency)\n- Run `./example` for macos\n\n  ```bash\n  cd ./example/macos\n  pod update flutter_libtdjson\n  cd ..\n  flutter run -d macos\n  ```\n\n- Bump the ios dependency version in `./ios/libtdjson.podspec`\n- Run `./example` for ios simulator\n\n  ```bash\n  cd ./example/ios\n  pod update flutter_libtdjson\n  cd ..\n  flutter run --debug\n  # link .dylib to search path, e.q:\n  # ln -s $(pwd)/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/flutter_libtdjson/libtdjson.dylib ~/Library/Developer/CoreSimulator/Devices/FD63D560-544B-4B18-8F2F-03B093156DE2/data/Containers/Bundle/Application/004B7B3D-4665-4217-A9C7-2D2193107E80/Runner.app/Frameworks/libtdjson.dylib\n  # Reload with `R`\n  ```\n\n- Bump the package version in `./pubspec.yaml`\n- Add changelog for new version in `./CHANGELOG.md`\n- Bump version info in `./README.md`\n- Git commit (message example: `bump td to vx.x.x`)\n- Git add tag (`git tag v?.?.?`, the tag version should be same as the version in pubspec.yaml)\n- Push with tags (`git push \u0026\u0026 git push --tags`)\n- Wait for CI task\n\n### Manually publish\n\n- https://dart.dev/tools/pub/publishing\n\n```bash\ndart pub publish\n\n# credentials file on macos\ncat ~/Library/Application\\ Support/dart/pub-credentials.json\n```\n\n## TODO\n\n- [ ] ⛔ is about `iOS with dylib`. There are .dylib files in build/ios/Debug-iphonesimulator/XCFrameworkIntermediates, but still...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fflutter_libtdjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup9cloud%2Fflutter_libtdjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup9cloud%2Fflutter_libtdjson/lists"}