<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNView/Option/preferredRenderingAPI",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:@SCNPreferredRenderingAPIKey"
  },
  "title" : "preferredRenderingAPI"
}
-->

# preferredRenderingAPI

The rendering API to use for rendering the view (for example, Metal or OpenGL).

```
static let preferredRenderingAPI: SCNView.Option
```

## Discussion

The value for this key is an <doc://com.apple.documentation/documentation/Foundation/NSNumber> object containing one of the values listed in [`SCNRenderingAPI`](/documentation/SceneKit/SCNRenderingAPI). You can also set this option from the inspector in Interface Builder.

SceneKit attempts to initialize a view using the preferred API you specify in the [`SCNView`](/documentation/SceneKit/SCNView) initializer; if the current device does not support the preferred API, SceneKit automatically falls back to a supported API. After initialization, use the [`renderingAPI`](/documentation/SceneKit/SCNSceneRenderer/renderingAPI) property to find out whether a fallback occurred. For example, if you specify the [`SCNRenderingAPI.metal`](/documentation/SceneKit/SCNRenderingAPI/metal) option when initializing a view on an iOS device that does not support Metal, SceneKit defaults to the [`SCNRenderingAPI.openGLES2`](/documentation/SceneKit/SCNRenderingAPI/openGLES2) option instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)