1

I would like to build an Augmented Reality App using App Playground. Can I build it using RealityKit framework?

enter image description here

I've already imported RealityKit and created ARViewContainer, but it showed error like this:

enter image description here

kkk
  • 187
  • 8

1 Answers1

0

You must add to your code the second compulsory UIViewRepresentable protocol's stub – updateUIView(_:context:) instance method. The content of this method can be empty.

public protocol UIViewRepresentable : View where Self.Body == Never {
    
    @MainActor func makeUIView(context: Self.Context) -> Self.UIViewType

    @MainActor func updateUIView(_ uiView: Self.UIViewType, 
                                  context: Self.Context)
}
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220