I'm trying to add prefix file to my Swift project, that use CoreData. My steps:
MySwiftProject-Prefix.pch
;.pch
file (#import <CoreData/CoreData.h>
);Build Settings
of my Target
set Precompile Prefix Header
to Yes
and Prefix Header
to MySwiftProject/MySwiftProject-Prefix.pch
;And now i get some errors like you need import CoreData. But why? Where did i wrong?
Thanks.
If this is a Swift project, it doesn't use a .pch
file. That's for Objective-C. Simply put import CoreData
at the top of your Swift file(s).