Jump to content

UIAlertView with a link?


Go to solution Solved by Rook,

10 posts in this topic

Recommended Posts

Posted (edited)

I need to make a button in my UIAlertView thats says: Support the author. I need it to redirect to an adlink :troll:

Also, could you please code it in objective c. I'm n00b at c++ :3 Thank you in advance

 

-KingRalph

Updated by KingRalph
Posted

An idea from me: Instead leading to an advert you should use your PayPal donation link ;) However replace the 'iOSGods.com' with whatever comes in your mind

/* Inside your Tweak.xm */

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Example"
message:@"Example Text Here"
delegate:self
cancelButtonTitle:@"Dismiss"
otherButtonTitles:@"Website",nil];
[alert show];
}

 /*Inside your PreferenceBundle.mm */


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

{
    NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
    if([title isEqualToString:@"Website"])
    {
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];
    }
}
Posted (edited)

:o

I'm n00b. I know :3

what he said

Thanks for for your help!

+1

I would make a paypal account but

1. my mom doesn't want me to hack so she won't let me :3

2. I'm underage

Updated by KingRalph
Posted (edited)

An idea from me: Instead leading to an advert you should use your PayPal donation link ;) However replace the 'iOSGods.com' with whatever comes in your mind

 

/* Inside your Tweak.xm */UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Example"message:@"Example Text Here"delegate:selfcancelButtonTitle:@"Dismiss"otherButtonTitles:@"Website",nil];[alert show];}
/*Inside your PreferenceBundle.mm */- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{	NSString *title = [alertView buttonTitleAtIndex:buttonIndex];	if([title isEqualToString:@"Website"])	{		[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];	}}
Don't I need to hook a class as well?

O.i

 

------EDIT------

I see how to use it now

Updated by KingRalph
Posted (edited)

@@castix if you have the alert in your tweak.xm why would you put the clickedButton method in the .mm of the pref bundle?

Before you close the hook of whatever class of the method the UIAlert is in you need to put 

%hook SomeClass
 
-(void)someMethod
{
 
//UIAlertView code here
}
 
%new
- (void)alertView :(UIAlertView *)alertView clickedButtonAtIndex :(NSInteger)buttonIndex
{   
     if([[alertView buttonTitleAtIndex:buttonIndex] isEqualToString :@"BUTTONTITLE"])    
     {       
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];    
    }
}

%end
 
Updated by Gh0stByte
Posted

 

@@castix if you have the alert in your tweak.xm why would you put the clickedButton method in the .mm of the pref bundle?

 

Before you close the hook of whatever class of the method the UIAlert is in you need to put 

%hook SomeClass
 
-(void)someMethod
{
 
//UIAlertView code here
}
 
%new
- (void)alertView :(UIAlertView *)alertView clickedButtonAtIndex :(NSInteger)buttonIndex
{   
     if([[alertView buttonTitleAtIndex:buttonIndex] isEqualToString :@"BUTTONTITLE"])    
     {       
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];    
    }
}

%end
 

I was wondering the same thing because what if I want to make a tweak, not a patcher?

+1

Posted (edited)

what he said

Is this how to use it?

 

%hook AppController

-(void)applicationDidBecomeActive:(id)arg {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Impossible flappy hack" message:@"Hacked by KingRalph!" delegate:nil cancelButtonTitle:@"Thank You!" otherButtonTitles:nil];
        [alert show];
        [alert release];
        %orig;
}

%new

- (void)alertView :(UIAlertView *)alertView clickedButtonAtIndex :(NSInteger)buttonIndex
{   
     if([[alertView buttonTitleAtIndex:buttonIndex] isEqualToString :@"BUTTONTITLE"])    
     {       
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];    
    }
}

%end 
Updated by KingRalph
  • Solution
Posted

Is this how to use it?

 

%hook AppController

-(void)applicationDidBecomeActive:(id)arg {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Impossible flappy hack" message:@"Hacked by KingRalph!" delegate:nil cancelButtonTitle:@"Thank You!" otherButtonTitles:nil];
        [alert show];
        [alert release];
        %orig;
}

%new

- (void)alertView :(UIAlertView *)alertView clickedButtonAtIndex :(NSInteger)buttonIndex
{   
     if([[alertView buttonTitleAtIndex:buttonIndex] isEqualToString :@"BUTTONTITLE"])    
     {       
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://iOSGods.com"]];    
    }
}

%end 

You have to add two buttons otherwise user won't be able to close the popup and play the game normally because the one button you will have will redirect to the website.

%hook SexyApplicationDelegate

-(void)applicationDidBecomeActive:(id)arg { 

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

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
  • Our picks

    • Fear the Walkers v1.0 [+2 Jailed Cheats]
      Modded/Hacked App: Fear the Walkers By OHM Games
      Bundle ID: com.ohmgames.zombiesurvivor
      App Store Link: https://apps.apple.com/us/app/fear-the-walkers/id6746712596?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Ammo
        • Winner
      • 1 reply
    • Fear the Walkers v1.0 [+2 Cheats]
      Modded/Hacked App: Fear the Walkers By OHM Games
      Bundle ID: com.ohmgames.zombiesurvivor
      App Store Link: https://apps.apple.com/us/app/fear-the-walkers/id6746712596?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Ammo
       
        • Winner
      • 1 reply
    • Eatventure v1.39.0 Jailed Cheats +2
      Modded/Hacked App: Eatventure By Lessmore UG haftungsbeschraenkt
      Bundle ID: com.hwqgrhhjfd.idlefastfood
      iTunes Store Link: https://apps.apple.com/us/app/eatventure/id1600871388?uo=4


      Hack Features:
      - Freeze Currencies
      - Free iAP (Turn on inside iOSGods Mod Menu first)


      Jailbreak required hack(s): https://iosgods.com/topic/168170-eatventure-cheats-all-versions-1/


      iOS Hack Download IPA Link: https://iosgods.com/topic/168169-eatventure-v110-jailed-cheats-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 343 replies
    • Empire Heroes: Strategy Game v1.0.1 [+4 Jailed Cheats]
      Modded/Hacked App: Empire Heroes: Strategy Game By VIETNAM TAAP TECHNOLOGY COMPANY LIMITED
      Bundle ID: com.nature.empireheroes
      App Store Link: https://apps.apple.com/us/app/empire-heroes-strategy-game/id6742527014?uo=4


      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Gems
      - Free IAP
      - Never Die
        • Agree
        • Winner
        • Like
      • 2 replies
    • Empire Heroes: Strategy Game v1.0.1 [+4 Cheats]
      Modded/Hacked App: Empire Heroes: Strategy Game By VIETNAM TAAP TECHNOLOGY COMPANY LIMITED
      Bundle ID: com.nature.empireheroes
      App Store Link: https://apps.apple.com/us/app/empire-heroes-strategy-game/id6742527014?uo=4


       

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Gems
      - Free IAP
      - Never Die
        • Winner
      • 1 reply
    • Matching Story v1.42.04 [ +6 Cheats ] Auto Win
      Modded/Hacked App: Matching Story By VERTEX GAMES PTE. LTD.
      Bundle ID: matching.story
      iTunes Store Link: https://apps.apple.com/ph/app/matching-story/id1558803930?uo=4


      🤩 Hack Features

      - Auto Win

      - Coins

      - Diamonds [ Win Match Linked With Moves ]

      - Lives

      - Booster

      - Moves
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 35 replies
    • Matching Story v1.42.04 [ +6 Jailed ] Auto Win
      Modded/Hacked App: Matching Story By VERTEX GAMES PTE. LTD.
      Bundle ID: matching.story
      iTunes Store Link: https://apps.apple.com/ph/app/matching-story/id1558803930?uo=4

       
      🤩 Hack Features

      - Auto Win

      - Coins

      - Diamonds [ Win Match Linked With Moves ]

      - Lives

      - Booster

      - Moves
        • Informative
        • Agree
        • Haha
        • Like
      • 45 replies
    • Shadow Fight 4: Arena Cheat v1.9.50 +4
      Modded/Hacked App: Shadow Fight 4: Arena By Nekki Limited
      Bundle ID: com.nekki.shadowfightarena
      iTunes Store Link: https://apps.apple.com/us/app/shadow-fight-4-arena/id1479050948?uo=4


      Hack Features:
      - Freeze Enemies

      ViP Features:
      - Multiply Attack
      - Multiply Defense
      - God Mode
       

      Non-Jailbroken & No Jailbreak required hack(s):  https://iosgods.com/topic/136035-shadow-fight-4-arena-v1920-jailed-cheat-4/


      iOS Hack Download Link: https://iosgods.com/topic/136014-shadow-fight-4-arena-cheat-v1920-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 385 replies
    • [ ArKnights TW ] 明日方舟 v28.4.01 - [ x Player Damage & More ]
      Modded/Hacked App: 明日方舟 By GRYPH FRONTIER PTE. LTD.
      Bundle ID: tw.txwy.ios.arknights
      iTunes Store Link: https://apps.apple.com/tw/app/%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F/id1490985322?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - x Player Damage - x1 - 1000
      - x Player Defense - x1 - 1000
      - x Player Attack Speed - x1 - 10
      - Frozen Enemies
      - Instant - Kill
      - Instant - Win
      - Unlimited Skills
      - No Deploy Cost

       

      Non-Jailbroken Hack: https://iosgods.com/topic/129722-arknights-tw-%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F-v26321-jailed-cheats-8/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/129583-arknights-tw-%E6%98%8E%E6%97%A5%E6%96%B9%E8%88%9F-v26321-x-player-damage-more/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 460 replies
    • Sneaky Sasquatch Cheats v2.0.6 +3
      Modded/Hacked App: Sneaky Sasquatch By RAC7 Games
      Bundle ID: com.rac7.SneakySasquatch
      iTunes Store Link: https://apps.apple.com/us/app/sneaky-sasquatch/id1098342019?uo=4


      Hack Features:
      - Infinite Gold
      - Unlock All
      - No Hunger


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/148262-sneaky-sasquatch-v172-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/148261-sneaky-sasquatch-cheats-v172-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 183 replies
    • Mini Militia - Doodle Army 2 Cheats v5.6.0 +8 [ God Mode & More ]
      Modded/Hacked App: Mini Militia - Doodle Army 2 By Miniclip SA
      Bundle ID: com.chadtowns.da2
      App Store Link: https://apps.apple.com/us/app/mini-militia-doodle-army-2/id405885221?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - God Mode
      - One Hit Kill
      - Infinite Ammo
      - No Reload
      - Infinite Grenade
      - Infinite Jetpack Boost
      - Friendly Fire Enabled
      - Premium

       

      Free Non-Jailbroken Hack: https://iosgods.com/topic/178790-mini-militia-doodle-army-2-v560-jailed-cheats-5/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/96342-mini-militia-doodle-army-2-cheats-v560-8-god-mode-more/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 602 replies
    • Tower of God: NEW WORLD Cheats v2.12.00 +4
      Modded/Hacked App: Tower of God: NEW WORLD By Netmarble Corporation
      Bundle ID: com.netmarble.tog
      iTunes Store Link: https://apps.apple.com/us/app/tower-of-god-new-world/id1599435437?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Always Critical
      - Skip Battle Intro


      Non-Jailbroken & No Jailbreak required hack(s): 
       

      iOS Hack Download Link: https://iosgods.com/topic/186202-tower-of-god-new-world-cheats-v20101-4/
        • Informative
        • Agree
        • Haha
        • Winner
        • Like
      • 96 replies
×
  • 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