Just so this question has an answer:
Add import MobileCoreServices to your source file.
import MobileCoreServices