Swiftgram / TDLibKit

Native Swift wrapper for Telegram's TDLib. Available on iOS, macOS, watchOS, tvOS and visionOS.
MIT License
106 stars 23 forks source link

Switch to latest JSON interface #21

Closed Kylmakalle closed 1 year ago

Kylmakalle commented 1 year ago

As for now, TDLibKit using td_json_client_create which produces an UnsafeMutablePointer to its instance. This usage is deprecated.

Alternatively, you can use old TDLib JSON interface, which will be removed in TDLib 2.0.0. https://core.telegram.org/tdlib/docs/td__json__client_8h.html

Also, some users noticed that the API of TdClient is not convenient enough, since it requires making a .run() call to send even synchronious requests (since Client was not created on init)