When saving depth data, how do I set the PHAssetMediaSubtypePhotoDepthEffect property? I'm able to save a jpg with depth data but it doesn't show up in the Depth Effect folder or have the deptheffect media subtype.
Here is the depth saving code taken from the wwdc2017 508 session.
// first add image
CGImageDestinationAddImage(cgImageDestination, renderedCGImage, attachments)
// Use AVDepthData to get auxiliary data dictionary
var auxDataType :NSString?
let auxData = depthData.dictionaryRepresentation(forAuxiliaryDataType: &auxDataType)
// Add auxiliary data to image destination
CGImageDestinationAddAuxiliaryDataInfo(cgImageDestination, auxDataType!, auxData! as CFDictionary)
if CGImageDestinationFinalize(cgImageDestination) {
return data as Data
}
Any help would be appreciated!
James