From the course: AR for iOS Developers: RealityKit and Reality Composer

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Load content into your app

Load content into your app - iOS Tutorial

From the course: AR for iOS Developers: RealityKit and Reality Composer

Start my 1-month free trial

Load content into your app

- [Instructor] Having prepared our reality composer files with some detectable images for our sun and our earth, we can now move forward to finally write some code. And what we'd like to do now is actually load our scenes into our view controller or into our AR view. You already know that Xcode generates some real types and real classes from the experience file or the RC project file that we are adding to our Xcode project. So what we can do for example in viewDidLoad real quickly is maybe create a sunAnchor by using a try statement because using Experience now and calling loanSun this could throw an arrow so we are we just using exclamation mark here to not have to handle these errors. Right now we are not going to keep this code here, but I'd like to show you how to actually synchronously load our sun scene into our project. So as you can see if we have a look at that, calling the loadSun function is actually returning…

Contents