I get the following error when compiling my project for the device, but not the simulator: error: objc/objc-class.h: No such file or directory
One of the files i have imports objc/objc-class.h and this is where it chokes.
Base SDK is iPhone OS 4.0 and deployment target is OS 3.2
Thanks
After you create a project, you can build and run your app on a simulated or real device without needing to lay out the user interface or write code. You may connect a real device to your Mac using a cable, or for iOS or tvOS apps, connect it over Wi-Fi after you pair it with Xcode.
DESCRIPTION. xcodebuild builds one or more targets contained in an Xcode project, or builds a scheme contained in an Xcode workspace or Xcode project. Usage To build an Xcode project, run xcodebuild from the directory containing your project (i.e. the directory containing the projectname.
The "build active architecture only" setting causes everything except the current Mac's architecture to be ignored (and the current one is of course valid), hiding the problem. Instead, you should look up a row or two in the settings, and change the "Architectures" setting to "Standard".
Try
#import <objc/runtime.h>
instead of
#import <objc/objc-class.h>
This worked for me, both for simulator & device.
On iOS it's
#import <objc/runtime.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