How to create collaboration (connect server socket, create CollabClient, ...) with react native?

I want to create collaboration with react native? How to connect socket, create CollabClient, …
I cannot find any document support this function with react native language.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi Iris,

Currently, we don’t have react-native support for the client-side. If you would like to develop your own client-side app, you can check out the apollo Graphql studio available at localhost:3000 when you start your server. You will be able to find all the Graphql Schema and API documentation there.

Best Regards,

Jimmy Lin

Software Developer

PDFTron Systems, Inc.

www.pdftron.com

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.

Hi PDF Tron Support/Jimmy - I would like to clarify on the above question. We have a web app performing the online collab/annotation and the mobile app in this case only VIEWING the online collab being performed in the web app.

I would assume that your answer above assumes the the mobile client (in react native) is driving the online collab/annotation - this is not our requirement.

Does this change your answer? If so, do you have some code examples/git hub accounts for socket connection et?

Note: we can see that there is alot of documentation related to cross platform etc ie.

etc etc

Hello Iris,

You will still need to sync with the backend for things like add/delete/update annotations if you are only VIEWING the document in the mobile app. We used Apollo Graphql for our web client-side package, they also got documentation on how to work with React Native: Integrating with React Native - Apollo GraphQL Docs and support for iOS: Introduction to Apollo iOS - Apollo GraphQL Docs

You can use their API to connect to the collab backend socket:

const url = `http://localhost:3000`;
const subscriptionUrl = `ws://localhost:3000/subscribe`;

Subscribe to the annotationChanged event, and then use WebViewer API to add/delete/update annotations in the document. Hope that can help with your project.

Best Regards,

Jimmy Lin

Software Developer

PDFTron Systems, Inc.

www.pdftron.com

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.