Image Playground Error: Cannot find protocol declaration for 'ImageGenerationViewControllerDelegate'

@available(macCatalyst 18.1, *)
@available(iOS 18.1, *)
extension CKImageSelectionManager: ImagePlaygroundViewController.Delegate {
    public func imagePlaygroundViewController(_ imagePlaygroundViewController: ImagePlaygroundViewController, didCreateImageAt imageURL: URL) {
        
    }
    
    func presentImagePlayground() {
        let imagePlaygroundVC = ImagePlaygroundViewController()
        
        // Set delegate to self to receive the callback
        imagePlaygroundVC.delegate = self
        
        imagePlaygroundVC.isModalInPresentation = true // Prevents dismissal with swipe if needed
        
self.delegate?.presentImageSelectionViewController(imagePlaygroundVC)
    }
    
}

This generates an error in the xcode generated swift header.

Image Playground Error: Cannot find protocol declaration for 'ImageGenerationViewControllerDelegate'
 
 
Q