Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native linking #30

Closed
jwktje opened this issue Jul 10, 2018 · 4 comments
Closed

React Native linking #30

jwktje opened this issue Jul 10, 2018 · 4 comments

Comments

@jwktje
Copy link

jwktje commented Jul 10, 2018

Apologies if this is a total misunderstanding. But would I be able to use the tdlib with your bindings by linking the library in React Native like mentioned here?

https://facebook.github.io/react-native/docs/linking-libraries-ios.html

The package you wrote works fine on my Node.JS local test application. I want to integrate it into an app with either React Native or Cordova so I wanna know what my options are.

@nodegin
Copy link
Owner

nodegin commented Jul 11, 2018

Hi, I never had experience with linking binaries with RN so I cannot answer your question, but you can try to build and bundle the binary into your RN app and fork tglib to make it load from RN application instead of path maybe? However I don't know if ffi and ref will work fine with RN too... Good luck!

@jwktje
Copy link
Author

jwktje commented Jul 11, 2018

Good point. I tested it yesterday and it didn't seem to work. Do you think it is possible to use TDLib in any environment like React Native, Cordova, or just straight up client-side JS? Or is this not possible?

@nodegin
Copy link
Owner

nodegin commented Jul 12, 2018

For native, I would suggest you to study the official examples here which integrates TDLib with native, this way should easier to do what you want, or even more, build a RN native extension so you can program in JS, but this basically creating a whole new library 😂

@nodegin
Copy link
Owner

nodegin commented Jul 12, 2018

By the way, the simplest way to do is use tglib from server side, then you write your own API to communicate your app with server, sounds stupid but feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants