WWDC 2017 Apple announced the framework for working with the augmented reality ARKit SDK.
Thanks to the camera and motion sensors, ARKit tracks motion, detects light and finds the surface. The framework tracks changes in the frame and compares them to the data from the motion sensor. As a result, a virtual model of the real world is created.
Basis ARKit: ARSCNView and ARSKView they contain the class ARSession, which works with augmented reality.
Virtual world reality?
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// Create a session configuration
let configuration = ARSessionConfiguration.isSupported ?
ARWorldTrackingSessionConfiguration() : ARSessionConfiguration()
sceneView.session.run(configuration)
}