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

    • Lucky Offense v1.4.1 [ +2 Cheats ] Battle Coins
      Modded/Hacked App: Lucky Offense By Crater Co., Ltd.
      Bundle ID: com.percent.ios.luckyrolling
      iTunes Store Link: https://apps.apple.com/us/app/lucky-offense/id6511224968?uo=4


      🤩 Hack Features

      - Battle Coins
      - ATK
      - ATK Range
      - ATK Speed

      ATK Linked Enemy
        • Like
      • 71 replies
    • Skullgirls Fighting RPG V7.3.0 [ +6 Jailed ] Auto Win
      Modded/Hacked App: Skullgirls: Fighting RPG By Autumn Games, LLC
      Bundle ID: com.autumn.skullgirls
      iTunes Store Link: https://apps.apple.com/us/app/skullgirls-fighting-rpg/id1280762571?uo=4


      Hack Features:

      - Auto win

      - Damage [ One HiT WiN ]

      - Energy Max

      - Skill

      - Enemy Disable

      - Goals Claimed [ Free Pass Only ]
        • Agree
      • 26 replies
    • Skullgirls Fighting RPG V7.3.0 [ +6 Cheats ] Auto Win
      Modded/Hacked App: Skullgirls: Fighting RPG By Autumn Games, LLC
      Bundle ID: com.autumn.skullgirls
      iTunes Store Link: https://apps.apple.com/us/app/skullgirls-fighting-rpg/id1280762571?uo=4


      Hack Features:
      - Auto win

      - Damage [ One HiT WiN ]

      - Energy Max

      - Skill

      - Enemy Disable

      - Goals Claimed [ Free Pass Only ]
        • Like
      • 120 replies
    • Matching Story v1.40.02 [ +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
      • 24 replies
    • Matching Story v1.40.02 [ +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
      • 34 replies
    • Mob Control v2.88.2 +7 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Mob Control By Voodoo
      Bundle ID: com.vincentb.MobControl
      iTunes Store Link: https://apps.apple.com/us/app/mob-control/id1562817072?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Skip'Its -> Earn or spend some.
      - Unlimited Stars -> Earn some.
      - Unlimited Bricks
      - Unlimited Earnt Bricks
      - Unlimited Cards -> Will increase instead of decrease.
      - No Card Requirement


      Jailbreak required hack(s): [Mod Menu Hack] Mob Control v2.78.0 +7 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Like
      • 213 replies
    • Mob Control v2.88.2 +7 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Mob Control By Voodoo
      Bundle ID: com.vincentb.MobControl
      iTunes Store Link: https://apps.apple.com/us/app/mob-control/id1562817072?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Skip'Its -> Earn or spend some.
      - Unlimited Stars -> Earn some.
      - Unlimited Bricks
      - Unlimited Earnt Bricks
      - Unlimited Cards -> Will increase instead of decrease.
      - No Card Requirement


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Mob Control v2.78.0 +7 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Like
      • 116 replies
    • Goblins Wood: Tycoon Idle Sim v2.48.3 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Cheat [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 23 replies
    • Goblins Wood: Tycoon Idle Sim v2.48.3 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Jailed Cheat [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 26 replies
    • Eternium Cheats v1.36.5 +11
      Modded/Hacked App: Eternium By Making Fun, Inc.
      Bundle ID: com.makingfun.mageandminions
      iTunes Store Link: https://apps.apple.com/us/app/eternium/id579931356?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

      - 5K Gems When Completed Stage
      - Infinite Gold
      - Infinite Cosmetic
      - Infinite Yellow Stone
      - Multiply Attack (Linked with Enemy)
      - No Skills Cooldown
      - No Consumable Cooldown
      - Multiply Attack Speed
      - Instant Regen Health
      - Always Crit
      - Material Drops (When you killed an Enemy it will drop materials for crafts)



      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/194526-eternium-cheats-v13355-6/
        • Informative
        • Agree
        • Winner
      • 71 replies
    • [Hack] DRAGON BALL Z DOKKAN BATTLE v5.26.0 +3 Cheats! [iOS 17/18]
      Modded/Hacked App: DRAGON BALL Z DOKKAN BATTLE by BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0221
      iTunes Store Link: https://itunes.apple.com/us/app/dragon-ball-z-dokkan-battle/id951627425


      Hack Features:
      - High Damage
      - High Defense
      - High HP

       

      Jailbroken hack: https://iosgods.com/topic/26098-updated-dragon-ball-z-dokkan-battle-v312-3-cheats/
      DRAGON BALL Z DOKKAN BATTLE Discussions Club: https://iosgods.com/clubs/23-dragon-ball-z-dokkan-battle-club/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,653 replies
    • Tap Titans 2 - Hero Legends v7.10.3 +9
      Modded/Hacked App: Tap Titans 2 - Hero Legends By Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://apps.apple.com/us/app/tap-titans-2-hero-legends/id1120294802?uo=4


      Hack Features:
      - Free Level Up
      - Free Skill Upgrades
      - Free Hired Heroes Upgrades
      - Skills Cost 0 Mana To Use
      - No Skill Cooldown
      - Skip Waves - Each Kill acts like the boss so it takes you to next stage instantly no need for waves to move on to next stage
      - Monsters Have Low HP - kill faster
      - Collect Ad Rewards Without Having to Watch Videos


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Agree
        • Like
      • 486 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