CIContext.heifRepresentation not working

I've been unable to get anything returned by the HEIF methods in iOS 11, namely CIContext's heifRepresentation(of image: format: colorSpace: options:). It always returns nil, no matter what format I use.

guard let image =  CIImage(contentsOf: sourceURL, options: [:]) else{ return }
   
let colorSpace = CGColorSpaceCreateDeviceRGB()

CIContext().heifRepresentation(of: image, format: kCIFormatRGBA8, colorSpace: colorSpace, options: options)//returns nil
       


Is there a trick, or is this a known issue of the current beta?

Any luck with this? The docs state: The CGColorSpace must be kCGColorSpaceModelRGB

I tried this with no luck so far.

CIContext.heifRepresentation not working
 
 
Q