Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing on one device to be visible on other

Tags:

xcode

ios

I want to create a Pictionary kind of app where multiple users can play and guess the drawing made by one person. How is it possible to sync the drawing one device to others globally?

like image 637
Swati Avatar asked Dec 31 '22 08:12

Swati


2 Answers

You should convert your drawing to a bitmap string. And then send it to the other device using:

  • Bluetooth
  • Firebase
  • socket
  • Push notification (silent push to retrieve data from server).

You can have a good explanation here

like image 160
Tekaya Marouene Avatar answered Jan 05 '23 18:01

Tekaya Marouene


You can do this using SocketIO, Create a connection with multiple devices using SocketIO, To send data to another device by socket.emit method and get the same thing by socket.on on the receiver side.

See this example for realtime update/share data using socket IO.

https://www.appcoda.com/socket-io-chat-app/

https://medium.com/@spiromifsud/realtime-updates-in-ios-swift-4-using-socket-io-with-mysql-and-node-js-de9ae771529

like image 26
AtulParmar Avatar answered Jan 05 '23 18:01

AtulParmar