3

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

junyi00
  • 792
  • 3
  • 8
  • 28
  • 1
    I advice you to learn Objective-C and the Cocoa Touch APIs reasonably before making a tweak, or you'll eventually mess up your device. –  Feb 12 '13 at 10:58
  • I'm glad you asked the question. I was confused too. This helped me. :-) – Patricia Jan 30 '14 at 18:14

1 Answers1

12

AppKit is for Mac; for iOS you want UIKit:

#import <UIKit/UIKit.h>
trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • I am using Xcode which is on mac, i have no idea why did my Xcode tag changed to iOS tag instead – junyi00 Feb 12 '13 at 11:03
  • @junyi00 I removed the xcode tag and added the ios tag as this question has nothing to do with Xcode and everything to do with iOS. – trojanfoe Feb 12 '13 at 11:04
  • I'm using IOSOpenDev which adds functions to Xcode which enables me to make tweaks on Xcode – junyi00 Feb 12 '13 at 11:08