# `GSFont setTempData:forKey:`

*Instance Method*

Sets temporary data for a key.

## Declaration

```swift
func setTempData(_ value: Any?, forKey key: String)
```

```objc
- (void) setTempData:(id) value forKey:(NSString *) key;
```

```python
setTempData_forKey_(value: object, key: str)
```

## Discussion

Pass `nil` as the value to remove existing temporary data for the key.

## See Also

### Temporary Data

- [`GSFont.tempData`](/Core/GlyphsCore/GSFont/tempData) — Runtime data stored on the font.
- [`GSFont tempDataForKey:`](/Core/GlyphsCore/GSFont/tempDataForKey:) — Returns temporary data for a key, or `nil` if no value is set.

