Jump to content

Recieving an error when compiling my tweak


Go to solution Solved by Chrizk0,

8 posts in this topic

Recommended Posts

Posted

Hello all, as some of you may already know I have begun the process of learning how to 'hack' apps. Anyway I recently started delving into Code Injection and I was just about to compile it when BOOM! a fatal error appeared. I looked into the problem and apparently in my .mm file I have imported a preferences.h file. Although it appears to be missing to the compiler and I can't see to find it either. I used Dida's Code Injection template here from the site could this have anything to do with it? If you need any further information feel free to leave a comment and I'll respond quickly. Thank you for all of those willing to help resolve this issue. By the way this is the only error I receive my code looks to have compiled fine it's just this one error.

Posted (edited)

what error?

what did you put in the files? (Without real code, if you like)

#import "writeData.h"

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.WITEGAMES.haypi.plist"

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%ctor {

if(GetPrefBool(@"kKey"))

{

writeData(0x066F60, 0x0700A0E1);

} else {

}

 

if(GetPrefBool(@"kGems"))

{

writeData(0x066F52, 0x0700A0E1);

} else {

}

 

if(GetPrefBool(@"kLives"))

{

writeData(0x066F1A, 0x0700A0E1);

} else {

}

 

if(GetPrefBool(@"kLives2"))

{

writeData(0x074494, 0x0010A0E3);

} else {

}

}

 

 

I got an error saying I was missing a preferences.h file

Updated by WITEGames
  • Solution
Posted (edited)

Everything is fine but you are missing headers to compile with. Right now you are using the default theos headers.

 

Download this https://www.sendspace.com/file/ev55tv

 

Extract it (Should take a few minutes or less), copy and paste the include directory to /var/theos

 

Now recompile.

Updated by Chrizk0

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines