Instructions to add the screen params of new iOS devices to the Cardboard SDK and XR Plugin

  • The Cardboard SDK requires updating screen_params.mm annually to work with new iOS devices.

  • Information for updating screen_params.mm, such as model strings and DPI values, can be found on websites like theapplewiki.com and Apple's technical specifications pages.

  • It is recommended to review the history of screen_params to ensure accurate updates are being made.

  • If using the XR Plugin, a new GfxPluginCardboard.a file needs to be generated with the updated screen_params.mm.

Each year, new iOS devices are released. To make the Cardboard SDK or Cardboard XR Plugin work with these new devices, update the resolutions.csv file for the project you are using.

Source of information

What needs to be updated

Depending on whether you are using the Cardboard SDK or the Cardboard XR Plugin, update the corresponding resolutions.csv file:

Both load device screen parameters dynamically at runtime from resolutions.csv inside sdk.bundle.

  • When contributing new device parameters upstream to Google Cardboard, submit pull requests to both the Cardboard SDK and Cardboard XR Plugin repositories (they are kept in sync using LINT.IfChange / LINT.ThenChange).
  • For local Unity projects using immutable UPM packages in Library/PackageCache/, developers can edit resolutions.csv directly inside the exported Xcode project under Frameworks/com.google.xr.cardboard/Runtime/iOS/sdk.bundle/resolutions.csv.

Format of resolutions.csv

Add a new line for each device using the following comma-separated format:

identifier,device_name,dpis
  • identifier: The hardware model string obtained from The Apple Wiki, with any comma replaced by a dot (for example, iPhone17,3 becomes iPhone17.3).
  • device_name: The marketing name of the device (for example, iPhone 16). This must not contain commas, as the runtime parser (stringSplit in screen_params.mm) splits on commas into a fixed 3-element array without quoting support; an embedded comma would displace the DPI token and cause it to evaluate to 0.0.
  • dpis: The screen pixel density in DPI/PPI followed by f (for example, 460.0f).

Example entries

iPhone17.3,iPhone 16,460.0f
iPhone17.4,iPhone 16 Plus,460.0f
iPhone17.1,iPhone 16 Pro,460.0f
iPhone17.2,iPhone 16 Pro Max,460.0f