Reputation: 949
I am setting up theos for making my first tweak. Now, I have used logify to generate a .xm
file, and put that file into my project directory (created with NIC).
When I try to compile, I get many unknown type name
errors, as you can see here. So, what I did was trying to import the headers where these types are declared, but I've read that you shouldn't import headers, and in fact that would give me even more errors.
So, my question is: how do I successfully solve these unknown type name
if I cannot import headers? Thanks in advance.
Upvotes: 0
Views: 2060
Reputation: 665
With your project, I think you need to import SpringBoard header #import <SpringBoard/SpringBoard.h>
.
With unknown type name
errors, you can follow steps below:
Google search for unknown type name
and import missing header. Example, unknown type name 'UIAlertView'
, we'll know that we need import UIKit.framework
#import <UIKit/UIKit.h>
.
After import framework, we can get this error fatal error: 'UIKit/UIKit.h' file not found
. Because inside header search path we don't have the imported framework. We can search this framework and copy to THEOS directory or Xcode (if we're using Mac OSX).
With two steps above, we still get unknown type name
, we can search header file for unknown type name
such as UIAlertView.h
and then copy to THEOS/include directory. Other way, we can modify our *.xm such as
@interface UIAlertView
@end
Sorry, I'm very bad in English therefore I can't explain :(
Upvotes: 1