导入< AppKit / AppKit.h>不起作用 [英] Importing <AppKit/AppKit.h> does not work

查看:405
本文介绍了导入< AppKit / AppKit.h>不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IOSOpenDev在Xcode上进行cydia调整,我尝试导入< AppKit / AppKit.h> ,但出现此错误!

'AppKit / AppKit.h'文件未找到'

这是我的代码,当有人尝试拍摄时会更改闪光灯的颜色屏幕快照

I am making a cydia tweak on Xcode using IOSOpenDev and i tried to import <AppKit/AppKit.h> but i'm getting this error!
'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

我调查了 opt / IOSOpenDev / include opt / theos / include ,无法找到 AppKit.h

如何解决此问题?请帮助

I looked into opt/IOSOpenDev/include and opt/theos/include and was unable to find AppKit.h
How do i fix this problem? Please help

推荐答案

AppKit适用于Mac;对于iOS,您需要UIKit:

AppKit is for Mac; for iOS you want UIKit:

#import <UIKit/UIKit.h>

这篇关于导入&lt; AppKit / AppKit.h&gt;不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆