PHAsset asset.mediaSubtypes.contains(.photoHDR) always return false

we are working on HDR images and found this problem, asset.mediaSubtypes.contains(.photoHDR) always return false

func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {

    guard !results.isEmpty else {return}

    let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: results.map({$0.assetIdentifier!}), options: nil)
    var selectedAssets:[PHAsset] = []
    fetchResult.enumerateObjects { asset, _, _ in
        selectedAssets.append(asset)
    }

    for i in selectedAssets.enumerated() {
        let asset:PHAsset = i.element

        print("\(i.offset): ")
        print(PHAssetMediaSubtype.photoHDR.rawValue)
        print(asset.mediaSubtypes)
        print("photoHDR \(PHAssetMediaSubtype.photoHDR.rawValue): \(asset.mediaSubtypes.contains(.photoHDR))")
        print("photoLive \(PHAssetMediaSubtype.photoLive.rawValue): \(asset.mediaSubtypes.contains(.photoLive))")
        print("photoPanorama \(PHAssetMediaSubtype.photoPanorama.rawValue): \(asset.mediaSubtypes.contains(.photoPanorama))")
        print("photoScreenshot \(PHAssetMediaSubtype.photoScreenshot.rawValue): \(asset.mediaSubtypes.contains(.photoScreenshot))")
        print("videoHighFrameRate \(PHAssetMediaSubtype.videoHighFrameRate.rawValue): \(asset.mediaSubtypes.contains(.videoHighFrameRate))")
        print("videoScreenRecording \(PHAssetMediaSubtype.videoScreenRecording.rawValue): \(asset.mediaSubtypes.contains(.videoScreenRecording))")
    }

}

Thank you for the sample code. Could you file a bug report and attach some of the image files that reproduce this behavior, and then provide the FB number here?

PHAsset asset.mediaSubtypes.contains(.photoHDR) always return false
 
 
Q