---
title: "decodeTimeMapping(forKey:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nscoder/decodetimemapping(forkey:)"
---

# decodeTimeMapping(forKey:)

Returns the Core Media time mapping structure associated with a given key.

## Declaration

```swift
func decodeTimeMapping(forKey key: String) -> CMTimeMapping
```

## Parameters

- `key`: The key for a CMTimeMapping structure encoded in the receiver.

## Return Value

Return Value The CMTimeMapping structure associated with key in the archive.

## See Also

### Related Documentation

- [encode(_:forKey:)](foundation/nscoder/encode(_:forkey:)-8tefb.md)

### Decoding Core Media Time Structures

- [decodeTime(forKey:)](foundation/nscoder/decodetime(forkey:).md)
- [decodeTimeRange(forKey:)](foundation/nscoder/decodetimerange(forkey:).md)
