---
title: "init(sequentialInfo:callbacks:)"
framework: coregraphics
role: symbol
role_heading: Initializer
path: "coregraphics/cgdataprovider/init(sequentialinfo:callbacks:)"
---

# init(sequentialInfo:callbacks:)

Creates a sequential-access data provider.

## Declaration

```swift
init?(sequentialInfo info: UnsafeMutableRawPointer?, callbacks: UnsafePointer<CGDataProviderSequentialCallbacks>)
```

## Parameters

- `info`: A pointer to data of any type or NULL. When Core Graphics calls the functions specified in the callbacks parameter, it sends each of the functions this pointer.
- `callbacks`: A pointer to a doc://com.apple.coregraphics/documentation/CoreGraphics/CGDataProviderSequentialCallbacks structure that specifies the callback functions you implement to handle the data provider’s basic memory management.

## Return Value

Return Value A new data provider. In Objective-C, you’re responsible for releasing this object using CGDataProviderRelease.

## Discussion

Discussion You use this function to create a sequential-access data provider that uses callback functions to read data from your program in a single block.

## See Also

### Creating Sequential-Access Data Providers

- [CGDataProviderSequentialCallbacks](coregraphics/cgdataprovidersequentialcallbacks.md)
- [CGDataProviderRewindCallback](coregraphics/cgdataproviderrewindcallback.md)
- [CGDataProviderGetBytesCallback](coregraphics/cgdataprovidergetbytescallback.md)
- [CGDataProviderSkipForwardCallback](coregraphics/cgdataproviderskipforwardcallback.md)
- [CGDataProviderReleaseInfoCallback](coregraphics/cgdataproviderreleaseinfocallback.md)
