Code Block func artWorkItem(imageToShow: UIImage) -> AVMetadataItem? { let item = AVMutableMetadataItem() item.value = imageToShow.pngData() as (NSCopying & NSObjectProtocol)? item.dataType = kCMMetadataBaseDataType_PNG as String item.identifier = AVMetadataIdentifier.commonIdentifierArtwork item.extendedLanguageTag = "und" return item.copy() as? AVMetadataItem }
From crash organizer stack trace crash occurs at line “item.value = imageToShow.pngData() as (NSCopying & NSObjectProtocol)?” States specialized AVMetaData.artWorkItem(imageToShow:) +252.
It also shows info like “specialized static Data_unconditionallyBridgeFromObjectiveC()”.Could not replicate the crash. What could be the reason for the crash ?. Is it some memory issue?