I added class files from another project to my new iPhone Window for the first time. The class is a simple class that defines a polygon, and subclasses NSObject. As part of the standard template for an Objective C class, this class definition imports Cocoa.h
#import <Cocoa/Cocoa.h>
However, just by adding this class, I'm getting an error that
Cocoa/Cocoa.h:No such file or directory.
I don't understand this because the exact same line occurs in another class definition (the controller) within the same project.
Subclasses of NSObject (at least on the iPhone) do not import the Cocoa.h header. Instead, they import Foundation.h:
#import <Foundation/Foundation.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With