ARkit networking sample?

Hi,


I've been coding for a very long time but am only just diving into the whole Swift, ARkit, RealityKit platform. I need to make a very simple iPhone ARkit app that can receive TCP or UDP messages from another computer (not iPhone) on the network and create objects in response to those messages. Real simple, for example it might receive a message that says "box" or "sphere" and would create a box or sphere object in the user's ARkit field of view and let them drop to the floor.


I think I follow all the ARkit/RealityKit stuff from reviewing various examples, but I'm not sure how to integrate receiving TCP/UDP messages into the ARkit framework. Can anyone point me to an example or docs that does TCP/UDP in an ARkit/RealityKit app? I didn't see any generic TCP/UDP samples in the switf/arkit/realitykit docs but I'm still looking. If someone can point me to them it would be a big help.

Have you looked at the SwiftShot sample code.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hello, I want to upload the ARworldMap data of arkit to the cloud server, and let others download it through the cloud server, and experience my arkit in the same place. But in the SwiftShot example, I only saw the MultipeerConnectivity framework for local interconnection. I need help, thanks

There’s two part to this:

  • Serialising the

    ARWorldMap
    into something that can be moved across the network (A)
  • Actually moving that data across the network (B)

I can’t help you with A, but the good news is that the process is likely to be very similar to what’s already demonstrated by SwiftShot.

With regards B, how you do this depends on a bunch of factors, all related to the server side:

  • Do you have existing infrastructure that you want to use for this?

  • Or are you planning to deploy your own infrastructure?

  • Or do you want to take advantage of Apple’s infrastructure (GameKit, or CloudKit, or whatever)?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
ARkit networking sample?
 
 
Q