---
title: "longLong(forKey:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsubiquitouskeyvaluestore/longlong(forkey:)"
---

# longLong(forKey:)

Returns the 64-bit integer value associated with the specified key.

## Declaration

```swift
func longLong(forKey aKey: String) -> Int64
```

## Parameters

- `aKey`: The key to retrieve from the iCloud key-value store.

## Return Value

Return Value The integer value associated with aKey, or 0 if the key isn’t present.

## Discussion

Discussion This method automatically coerces certain types to their equivalent long integer values. The Boolean value true becomes 1 and false becomes 0. A floating-point number becomes the greatest integer that’s less than the stored number –– for example, 2.67 becomes 2. A string that contains a numerical value contains the equivalent integer value — for example, “123” becomes 123.

## See Also

### Getting values

- [bool(forKey:)](foundation/nsubiquitouskeyvaluestore/bool(forkey:).md)
- [double(forKey:)](foundation/nsubiquitouskeyvaluestore/double(forkey:).md)
- [string(forKey:)](foundation/nsubiquitouskeyvaluestore/string(forkey:).md)
- [data(forKey:)](foundation/nsubiquitouskeyvaluestore/data(forkey:).md)
- [object(forKey:)](foundation/nsubiquitouskeyvaluestore/object(forkey:).md)
- [array(forKey:)](foundation/nsubiquitouskeyvaluestore/array(forkey:).md)
- [dictionary(forKey:)](foundation/nsubiquitouskeyvaluestore/dictionary(forkey:).md)
- [dictionaryRepresentation](foundation/nsubiquitouskeyvaluestore/dictionaryrepresentation.md)
