I found a workaround for my problem - I downloaded the latest version of xcode from this page https://developer.apple.com/download/applications/, and it works well with preview. The version from AppStore still doesn't work, but that doesn't matter to me now.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: