Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!
'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

like image 553
junyi00 Avatar asked Feb 27 '26 21:02

junyi00


1 Answers

AppKit is for Mac; for iOS you want UIKit:

#import <UIKit/UIKit.h>
like image 75
trojanfoe Avatar answered Mar 01 '26 10:03

trojanfoe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!