Jump to content

Patcher not compiling...


Go to solution Solved by Joka,

7 posts in this topic

Recommended Posts

Posted (edited)

I've encountered 3 issues today and my day cannot get any better! :rofl:

So basically, I've tried compiling my patcher and this is the error I get:

image.png

and

image.png

---------------------------------------

This is my tweak.xm:

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iOSGods.BuddymanKickByJoka.plist"

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

%hook PBGlobalStatistic

-(int)money {
if(GetPrefBool(@"kGold")) {
return 999999999;
}
return %orig;
}

-(int)coinsCount {
if(GetPrefBool(@"kCoin")) {
return 999999999;
}
return %orig;
}

%end

%hook PBSlotsManager

-(unsigned long long)getSpinsCount {
if(GetPrefBool(@"kSpins")) {
return 999999999;
}
return %orig;
}

%end


/* Popup with a link

Varieties of a UIAlertView Popup can be found here: http://iosgods.com/topic/13988-varieties-of-uialertview-types-to-use-in-your-tweaks-patchers/

*/


%hook PocketBuddyAppDelegate // Change this with your Application's Delegate. AppController, UnityAppController, GameDelegate etc.

- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.
UIAlertView *igcredits = [[uIAlertView alloc] initWithTitle:@"Bm Cheats"
message:@"\nBm Cheats by Joka for iOSGods.com"
delegate:self
cancelButtonTitle:@"Thanks"
otherButtonTitles:@"Visit Us", nil];
[igcredits show];
[igcredits release];
return %orig();
}

%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

if([button isEqualToString:@"Visit Us"])
{
[[uIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://iosgods.com/]];
}
}
%end

If you have any idea on how to fix, please leave a comment. Thank you! :)

Updated by Joka
Posted

I've encountered 3 issues today and my day cannot get any better! :rofl:

 

So basically, I've tried compiling my patcher and this is the error I get:

 

image.png

 

and

 

image.png

 

---------------------------------------

 

This is my tweak.xm:

 

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iOSGods.BuddymanKickByJoka.plist"

 

inline bool GetPrefBool(NSString *key) {

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

}

 

%hook PBGlobalStatistic

 

-(int)money {

if(GetPrefBool(@"kGold")) {

return 999999999;

}

return %orig;

}

 

-(int)coinsCount {

if(GetPrefBool(@"kCoin")) {

return 999999999;

}

return %orig;

}

 

%end

 

%hook PBSlotsManager

 

-(unsigned long long)getSpinsCount {

if(GetPrefBool(@"kSpins")) {

return 999999999;

}

return %orig;

}

 

%end

 

 

/* Popup with a link

 

Varieties of a UIAlertView Popup can be found here: http://iosgods.com/topic/13988-varieties-of-uialertview-types-to-use-in-your-tweaks-patchers/

 

*/

 

 

%hook PocketBuddyAppDelegate // Change this with your Application's Delegate. AppController, UnityAppController, GameDelegate etc.

 

- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.

UIAlertView *igcredits = [[uIAlertView alloc] initWithTitle:@"Bm Cheats"

message:@"\nBm Cheats by Joka for iOSGods.com"

delegate:self

cancelButtonTitle:@"Thanks"

otherButtonTitles:@"Visit Us", nil];

[igcredits show];

[igcredits release];

return %orig();

}

 

%new

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

 

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

 

if([button isEqualToString:@"Visit Us"])

{

[[uIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://iosgods.com/]];

}

}

%end

 

If you have any idea on how to fix, please leave a comment. Thank you! :)

 

No return %orig(); in below alertView

Posted

Well, the errors are pretty self-explaining. The UIAlertView is not supported since 9.0 anymore, you need to use an alternative like UIAlertController now.

So what will the new UIAlert/Controller text look like in the Tweak.xm?

Posted

I am yet to discover this. :D

My plans for today were to make template with a popup, but I don't know if I'll have time for that.

If you are farmiliar with Objective C you can also take a look at the Apple's documentation: https://developer.apple.com/reference/uikit/uialertcontroller

Thanks.

 

I tried that and it didn't work ._. I'll use the iOS 8 SDK and will see it that works :p

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