<repo_name>madebyalex/ar-realcomp-test1<file_sep>/AR_RealComp_Test1/ViewController.swift
//
//  ViewController.swift
//  AR_RealComp_Test1
//
//  Created by Alexander on 15.11.2020.
//  Copyright © 2020 <NAME>. All rights reserved.
//


import UIKit
import ARKit
import RealityKit

class ARController: UIViewController {
    var arView = ARView(frame: .zero)
//    @IBOutlet var arView: ARView!


    override func loadView() {
        super.loadView()
        view.addSubview(arView)
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        arView.frame = view.frame

        Hexagon.loadSceneAsync {(result) in
            do {
                let hexagonScene = try result.get()
                self.arView.scene.addAnchor(hexagonScene)

                print("Displaying AR model")

            } catch {
                print(error)
                print("Nothing to show")
            }
        }
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        let configuration = ARWorldTrackingConfiguration()
        arView.session.run(configuration)
    }
}

//import UIKit
//import RealityKit
//
//class ViewController: UIViewController {
//
////    @IBOutlet var arView: ARView!
//    var arView = ARView(frame: .zero)
//
//    override func viewDidLoad() {
//        super.viewDidLoad()
//
//        // Load the "Box" scene from the "Experience" Reality File
//        let boxAnchor = try! Experience.loadBox()
//
//        // Add the box anchor to the scene
//        arView.scene.anchors.append(boxAnchor)
//    }
//}
<file_sep>/README.md
# ar-realcomp-test1
Test app #1 with Reality Composer
