# Displaying a Model Asset

Now that you have successfully integrated the echo3D SDK into Xcode, it's time to display a model in your project!

[Scene Kit](https://developer.apple.com/documentation/scenekit) is a rendering engine that allows you to develop native iOS and visioOS apps in Xcode.

## Adding 3D content

Add a **model asset** through the platform. Here's how:

{% content-ref url="../web-console/how-to-add-content" %}
[how-to-add-content](https://docs.echo3d.com/web-console/how-to-add-content)
{% endcontent-ref %}

## Setting Up an Application

Construct an object of type Echo3D and use it to access Assets stored under your echo3D account's API Key.

Render your assets however you want.

## Example Setup:

<figure><img src="https://3757500311-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M41BcmqhdFQ3r89wcIR%2Fuploads%2FbkYKs5QhRIXwlWKTsViN%2FScreenshot%202023-08-10%20at%202.30.05%20PM.png?alt=media&#x26;token=8502119e-6010-40ac-80cb-271a15b6f336" alt="" width="375"><figcaption></figcaption></figure>

{% code overflow="wrap" lineNumbers="true" %}

```swift
import SwiftUI
import SceneKit

struct ContentView: View { // Creates a SwiftUI View
    var body: some View { // Creates a SwiftUI body
        VStack {
            Text("View Your Echo3D Model!")
                .font(.headline)

            SceneKitView()
                .frame(width: 350, height: 350) // Adjust the size as needed
        }
    }
}

struct SceneKitView: UIViewRepresentable { // Creates the Scene with 3D Model using SceneKit and Echo3D Swift SDK
    
    func makeUIView(context: Context) -> SCNView { // Creates a simple scene
        let sceneView = SCNView()
        sceneView.autoenablesDefaultLighting = true
        sceneView.allowsCameraControl = true
        return sceneView
    }

    func updateUIView(_ sceneView: SCNView, context: Context) { // Adds 3D Model stored under your Echo3D Accounts API Key
        let e = Echo3D(); // Create an object of class Echo3D
        
        e.queryDatabase(api_key: e.api_key, completion: { (entry_list) -> () in // Queries Echo3D's database for 3d Models
            let entry = entry_list[0]
            entry.downloadFile(completion: { (storage_id) in // Downloads the specificed 3D model entry and loads it into the scene
                if let object = try? SCNScene(url: storage_id, options: nil) {
                    let objectNode = object.rootNode
                    sceneView.scene = object
                    sceneView.scene?.rootNode.addChildNode(objectNode)
                }
            });
        });
    }
}

@main
struct SDKTest2_6App: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}
```

{% endcode %}
