# 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="/pages/-M41wQICYWUWeloxCkls" %}
[Add Assets](/web-console/how-to-add-content.md)
{% 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="/files/4lLjydoq1GWENgMgpWaF" 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.echo3d.com/swift/displaying-a-model-asset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
