---
title: "init(from:)"
framework: Immersive Media Support
role: symbol
role_heading: Initializer
platforms: [iOS 26.4+, iPadOS 26.4+, Mac Catalyst 26.4+, macOS 26.0+, visionOS 26.0+]
path: "immersivemediasupport/immersivecameralensdefinition/init(from:)"
---

# init(from:)

Creates an ImmersiveCameraLensDefinition object from a ILPD data blob, basically the JSON contents of a ILPD file..

## Declaration

```swift
init(from data: Data) throws
```

## Discussion

Discussion note: This function throws an appropriate error when the data is not well formatted of there are unexpected errors in the JSON.
