Reputation: 675
My Xcode project was running all good, I connected my iPhone to transfer the build and since then I am getting these errors
Unknown type name CGContextRef in file CGBitmapContext.h
I have been unable to solve this for sometime now.
Upvotes: 1
Views: 306
Reputation: 544
Faced the issue in Xcode 11.3. Done everything related to derived data clear, pod remove and everything available on internet but no luck and the app was not debugging on real device. Then thought that it could be the issue of Xcode crash, just removed the Xcode to trash and cleared the trash and then reinstalled the fresh copy of Xcode 11.3. It worked for me, thanks to my assumption.
Upvotes: 0
Reputation: 62686
Core Graphics, where the CG* stuff is defined, is imported by UIKit, so add this line:
#import <UIKit/UIKit.h>
in the offending file
Upvotes: 2
Reputation: 64
Try to clean derived data in Xcode. Xcode- Preferences - Locations - Derived Data - You must delete derived data from there. And clean project.
Upvotes: 0