[英]Importing <AppKit/AppKit.h> does not work
I am making a cydia tweak on Xcode using IOSOpenDev and i tried to import <AppKit/AppKit.h>
but i'm getting this error! 我正在使用IOSOpenDev在Xcode上进行cydia调整,我尝试导入
<AppKit/AppKit.h>
但出现此错误!
'AppKit/AppKit.h' file not found'
This is my code which changes the flash color when someone tries to take a screenshot 这是我的代码,当有人尝试截屏时会更改闪光灯的颜色
#include <AppKit/AppKit.h>
%hook SBScreenFlash
-(void)flashColor:(id)color {
NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.junyi00.screenshotcolor.plist"];
if ([[prefs objectForKey:@"enable"] boolValue]){
color = [NSColor blueColor];
%orig(color); }
else {
%orig; }
}
%end
I looked into opt/IOSOpenDev/include
and opt/theos/include
and was unable to find AppKit.h
我调查了
opt/IOSOpenDev/include
和opt/theos/include
,但找不到AppKit.h
How do i fix this problem? 我该如何解决这个问题? Please help
请帮忙
AppKit is for Mac; AppKit适用于Mac; for iOS you want UIKit:
对于iOS,您需要UIKit:
#import <UIKit/UIKit.h>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.