---
title: "newDisplay(with:port:serialNum:)"
framework: Paravirtualized Graphics
role: symbol
role_heading: Instance Method
platforms: [Mac Catalyst 14.0+, macOS 11.0+]
path: "paravirtualizedgraphics/pgdevice/newdisplay(with:port:serialnum:)"
---

# newDisplay(with:port:serialNum:)

Create a display from the specified descriptor and uniquifying parameters.

## Declaration

```swift
func newDisplay(with descriptor: PGDisplayDescriptor, port: Int, serialNum: UInt32) -> (any PGDisplay)?
```

## Parameters

- `descriptor`: The description of the new display.
- `port`: The port number on the accelerator for the device to use for the new display. Specify a unique port number for each display.
- `serialNum`: A number that uniquely identifies the display. Ensure that the display persists across multiple launches so that the guest compositor can maintain a consistent display layout.

## Return Value

Return Value A new display object, or nil if an error occurred.
