Importing <AppKit/AppKit.h> does not work

丶灬走出姿态 提交于 2019-12-08 02:45:00

问题


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

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


回答1:


AppKit is for Mac; for iOS you want UIKit:

#import <UIKit/UIKit.h>


来源:https://stackoverflow.com/questions/14830853/importing-appkit-appkit-h-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!