Jump to content

How can I add a UIAlert to a Gameloft game without the game freezing?


Go to solution Solved by Rook,

10 posts in this topic

Recommended Posts

  • Solution
Posted

Try this:

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)application { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Nova 3 Cheats" 
					          message:@"Hacked by shmoo for iOSGods.com!" 
                                                 delegate:self 
  					cancelButtonTitle:@"Close" 
  					otherButtonTitles:@"Visit Us", nil]; 
[credits show];
[credits release]; 
%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://www.iOSGods.com/"]];                                                                                
	}
}
%end
Posted

Try this:

 

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)application { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Nova 3 Cheats" 
					          message:@"Hacked by shmoo for iOSGods.com!" 
                                                 delegate:self 
  					cancelButtonTitle:@"Close" 
  					otherButtonTitles:@"Visit Us", nil]; 
[credits show];
[credits release]; 
%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://www.iOSGods.com/"]];                                                                                
	}
}
%end

Thank you so much DiDA!

Posted

Does the clickable button work for you?

Posted

Does the clickable button work for you?

For some reason it makes the game log me in online then bring me to the leaderboards O.o

Posted

#include <unistd.h>

 

[NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(apply) userInfo:nil repeats:NO];

And in your class you would have a method defined as

 

-(void)apply

{

//Do stuff

}

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