Jump to content

12 posts in this topic

Recommended Posts

Posted

Got through all the errors on compiling and it doesn't seem to work when I launch my app.  I'm guessing I should post my code or at least examples of it?

Posted
#define PLIST_PATH @"/var/mobile/Library/Preferences/kev.plist"
#include <UIKit/UIKit.h>
#include "writeData.h"


inline bool GetPrefBool(NSString *key)
{
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

inline int GetPrefInt(NSString *key)
{
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] intValue];
}

%hook AutoRapAppDelgate
-(void)applicationDidBecomeActive:(id)arg {
	int itemValue = GetPrefInt(@"kItemNumber");
	
	UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Testing" 
													message:[NSString stringWithFormat:@"%d",itemValue]
												   delegate:nil 
										  cancelButtonTitle:@"Done" 
										  otherButtonTitles:nil];
	[alert show];
	[alert release];
}
%end


%ctor {
	if(GetPrefBool(@"kTest1"))
	{
		writeData(0xXXXXXX, 0xXXXX);  
	} 
	if(GetPrefBool(@"kTest2"))
	{
		writeData(0xXXXXXX, 0xXXXXXXXX); 
	} 
	if(GetPrefBool(@"kTest3"))
	{
		writeData(0xXXXXXX, 0xXXXXXXXX); 
	}

	
}

I'm positive I didn't type the bundle ID wrong, but where would I check that?

Posted (edited)

RIP, I didn't notice that when copy/pasted an example.  Can I put the message -box code inside of the %ctor{} section?

 

Edit: I also put in the correct identifier, just checked that.

 

Edit2: Just removed the message box code for now.  I can't get it to write any data.

Updated by Kevv

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