Missing PDFKit on macOS (Xcode 12.0 beta (12A6159))

Good Tuesday morning, I hope everyone is having a blast in WWDC20 Online so far. Downloaded latest Xcode 12.0, tried compiling my software. Everything seems peachy, but importing PDFKit on macOS specifically seems to break.

In documentation, there is no mention of removal, so I assume it's an omission or something that changed?

Cheers
Michel

Code Block swift
#if os(macOS)
import PDFKit
...

No such module 'PDFKit'

Answered by Developer Tools Engineer in 613907022
Hi, you can workaround this by importing Quartz (which implicitly imports PDFKit):

Code Block
#if os(macOS)
import Quartz
#endif


this works in past Xcode versions as well.
Accepted Answer
Hi, you can workaround this by importing Quartz (which implicitly imports PDFKit):

Code Block
#if os(macOS)
import Quartz
#endif


this works in past Xcode versions as well.
Awesome! Thank you!
I was running into the same issue and really appreciate this solution. For what it's worth, I found that I also needed to remove the PDFKit framework that I had originally added to the project in Mojave (and that also worked in Catalina). It was causing a code signing error.
Missing PDFKit on macOS (Xcode 12.0 beta (12A6159))
 
 
Q