﻿> These docs cover Nitro Cookies 1.3.0. List APIs, scoped deletion, and normalized errors are available from 1.3.0. Check the installation guide and release history when upgrading from an earlier version.

# Read cookies

Read a dictionary for name-based lookup or a list to preserve duplicate names.
On Apple platforms, URL queries use domain selection. Use [request headers](https://l2hyunwoo.github.io/react-native-nitro-cookies/reference/requests.md) for cookies eligible for an actual request.

`useWebKit` defaults to `false`. It selects the iOS WebKit store when `true`; tvOS rejects that selection and Android ignores the flag.
An empty query returns `{}` for dictionaries or `[]` for lists.

## getSync

```ts
getSync(url: string): Cookies
```

Read the default store synchronously. Results are keyed by name; duplicate names overwrite earlier entries.

## get

```ts
get(url: string, useWebKit?: boolean): Promise<Cookies>
```

Read the selected store asynchronously. Dictionary results retain the existing name-collision behavior. Android metadata is derived from the URL, not the stored cookie scope.

## getListSync

```ts
getListSync(url: string): Cookie[]
```

**Added in 1.3.0.** Read the default store without losing duplicate names. Apple results preserve stored domains and paths. Android URL results contain name/value pairs only.

## getList

```ts
getList(url: string, useWebKit?: boolean): Promise<Cookie[]>
```

**Added in 1.3.0.** Read a list from the selected store. Order follows the native result. Do not treat Android list entries as deletion identifiers without the original write scope.

## getAll

```ts
getAll(useWebKit?: boolean): Promise<Cookies>
```

Read all cookies from the selected Apple store, regardless of domain. Duplicate names collapse into a dictionary. Android rejects with PLATFORM_UNSUPPORTED.

## getAllList

```ts
getAllList(useWebKit?: boolean): Promise<Cookie[]>
```

**Added in 1.3.0.** Read every cookie from the selected Apple store while preserving duplicate names and stored scope. Android rejects with PLATFORM_UNSUPPORTED.

[Types](https://l2hyunwoo.github.io/react-native-nitro-cookies/reference/types.md) · [Errors](https://l2hyunwoo.github.io/react-native-nitro-cookies/reference/errors.md) · [Platform support](https://l2hyunwoo.github.io/react-native-nitro-cookies/reference/platforms.md)
