---
title: "beginLoadingImageData(for:)"
framework: addressbook
role: symbol
role_heading: Instance Method
path: "addressbook/abperson/beginloadingimagedata(for:)"
---

# beginLoadingImageData(for:)

Starts an asynchronous fetch for image data in all locations

## Declaration

```swift
func beginLoadingImageData(for client: (any ABImageClient)!) -> Int
```

## Parameters

- `client`: The object to be notified when the image finishes loading.

## Return Value

Return Value A nonzero tag for tracking. This tag is used by the cancelLoadingImageData(forTag:) method to cancel a fetch operation.

## Discussion

Discussion The client object should conform to the ABImageClient protocol. A consumeImageData(_:forTag:) message is sent to client when the fetch is done. Use the cancelLoadingImageData(forTag:) method if you need to cancel an asynchronous fetch.

## See Also

### Managing Images

- [cancelLoadingImageData(forTag:)](addressbook/abperson/cancelloadingimagedata(fortag:).md)
- [imageData()](addressbook/abperson/imagedata().md)
- [setImageData(_:)](addressbook/abperson/setimagedata(_:).md)
