1. Overview
The iOS SDK now provides frame-level callbacks, an abort mechanism, and improved data models compatible with PMF Story output.
2. Key API Additions
2.1. onFrameCaptured Callback
Replaces onProgress with richer frame context.
public struct FrameCapturedCallback {
public let progress: Float
public let resultPMF: ResultPMF
public let orientation: [Double]
public let lux: Float
}
Usage:
readerView.onFrameCaptured = { frame in
print("Progress: \(frame.progress), Lux: \(frame.lux)")
}
2.2. Abort Support
Added onAbort callback and SwiftUI binding for abort handling.
@State private var isAborted = false
ReaderViewWrapper(
analyserConfiguration: config,
onAbort: { model in
// handle abort event with partial PMF Story data
},
isAborted: $isAborted
)
-
Returns partial
ResultModelcontaining collectedpmfStoryframes -
Aborted analyses cannot be resumed
2.3. ResultModel Update
ResultModel now includes a pmfStory array to store per-frame analysis data, removing deprecated base64 image fields.
3. Migration Notes
|
Change |
Action |
|---|---|
|
Added |
Handle user cancellation if required |
|
Added |
Replace old |
|
Model change |
Update integrations to use |