Jump to content

Can't get UI popup working in theos


Go to solution Solved by Ted2,

8 posts in this topic

Recommended Posts

Posted

This is the UI code I am using 

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)arg { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Test Title" 
                                                  message:@"Test Message" 
                                                 delegate:self
                                        cancelButtonTitle:@"Close Test Pop-Up" 
                                        otherButtonTitles:@"Test Link", nil]; 
[credits show];
[credits release]; 
%orig();
}
 
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
 
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
 
        if([button isEqualToString:@"Test Link"])
        {
                [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.test.com"]];                                                                               
        }
}

%end 

And this is the error I get when I try to compile it 

Amirhosseins-iPad:/var/mobile root# cd knife
Amirhosseins-iPad:/var/mobile/knife root# make package
> Making all for tweak Knife
==> Preprocessing Tweak.xm
==> Compiling Tweak.xm (armv7)…
Tweak.xm:32:430: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
  ...SEL, id); static void _logos_method$_ungrouped$AppDelegate$alertView$clickedButtonAtIndex$(_LOGOS_SELF_TYPE_NORMAL AppDelegate* _LOGOS_SELF_CONST, SEL, UIAlertVie...
                                                                                                                                                             ^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
Tweak.xm:14:1: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Test Title" 
^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
Tweak.xm:14:26: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Test Title" 
                         ^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
Tweak.xm:25:171: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
  ...AppDelegate* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UIAlertView * alertView, NSInteger buttonIndex) {
                                                                      ^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
Tweak.xm:37:490: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
  ...= 0; _typeEncoding[i] = 'v'; i += 1; _typeEncoding[i] = '@'; i += 1; _typeEncoding[i] = ':'; i += 1; memcpy(_typeEncoding + i, @encode(UIAlertView *), strlen(@enc...
                                                                                                                                            ^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
Tweak.xm:37:521: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
  ...i += 1; _typeEncoding[i] = '@'; i += 1; _typeEncoding[i] = ':'; i += 1; memcpy(_typeEncoding + i, @encode(UIAlertView *), strlen(@encode(UIAlertView *))); i += st...
                                                                                                                                              ^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
Tweak.xm:37:559: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 [-Werror,-Wdeprecated-declarations]
  ...+= 1; _typeEncoding[i] = ':'; i += 1; memcpy(_typeEncoding + i, @encode(UIAlertView *), strlen(@encode(UIAlertView *))); i += strlen(@encode(UIAlertView *)); memc...
                                                                                                                                                  ^
/var/theos/sdks/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here
@interface UIAlertView : UIView
           ^
7 errors generated.
make[3]: *** [/var/mobile/knife/.theos/obj/debug/armv7/Tweak.xm.537ad2d2.o] Error 1
make[2]: *** [/var/mobile/knife/.theos/obj/debug/armv7/Knife.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [Knife.all.tweak.variables] Error 2
Amirhosseins-iPad:/var/mobile/knife root# make package

Then we I change it to all UIAlertView to UIAlertController I get

Amirhosseins-iPad:/var/mobile root# cd knife
Amirhosseins-iPad:/var/mobile/knife root# make package
> Making all for tweak Knife
==> Preprocessing Tweak.xm
==> Compiling Tweak.xm (armv7)…
Tweak.xm:14:57: error: 'UIAlertController' may not respond to 'initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:' [-Werror]
UIAlertController *credits = [[UIAlertController alloc] initWithTitle:@"Test Title" 
                              ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
Tweak.xm:19:10: error: 'UIAlertController' may not respond to 'show' [-Werror]
[credits show];
 ~~~~~~~ ^
Tweak.xm:27:31: error: 'UIAlertController' may not respond to 'buttonTitleAtIndex:' [-Werror]
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
                    ~~~~~~~~~ ^
3 errors generated.
make[3]: *** [/var/mobile/knife/.theos/obj/debug/armv7/Tweak.xm.537ad2d2.o] Error 1
make[2]: *** [/var/mobile/knife/.theos/obj/debug/armv7/Knife.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [Knife.all.tweak.variables] Error 2
Amirhosseins-iPad:/var/mobile/knife root# 

Any help is appreciated 

Posted

I think u need to add this on top of your tweak.xm

 

#import <UIKit/UIKit.h>

 

Also this in your makefile

 

brp_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit AudioToolbox

 

+ What SDKS do you have installed?

Posted

I already have that in my make files and tweak xm 

as of sdks 

ive got iOS 9.3 and 10.1

Just now, TheHackingFreak said:

I already have that in my make files and tweak xm 

as of sdks 

ive got iOS 9.3 and 10.1

 

4 minutes ago, Ted2 said:

I think u need to add this on top of your tweak.xm

 

#import <UIKit/UIKit.h>

 

Also this in your makefile

 

brp_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit AudioToolbox

 

+ What SDKS do you have installed?

 

Posted
1 minute ago, TheHackingFreak said:

Added it to my sdks, still get the same error, do I have to add something in my make file so it target iPhone 8 sdk ?

Try remove/move the other 2 sdks for now & then test. iOS 8.1 SDK is most "stable" imo

Posted
2 minutes ago, TheHackingFreak said:

Dude I fcking love you, it worked. Had to target 8.1

much love for always helping 

No problem, I know how it is to strugle with theos errors :p 

Make sure you mark my answer as solved, so others know it's solved :) 

  • Like 1

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

    • Angry Birds 2 Cheats v4.0.2 +1 [ Infinite Currencies ]
      Modded/Hacked App: Angry Birds 2 By Rovio Entertainment Oyj
      Bundle ID: com.rovio.baba
      iTunes Store Link: https://apps.apple.com/us/app/angry-birds-2/id880047117?uo=4


      Hack Features:
      - Infinite Currencies ( Spend some/ Get some )


      Non-Jailbroken & No Jailbreak required hack(s):  https://iosgods.com/topic/70081-angry-birds-2-v2600-jailed-cheats-2/


      Hack Download Link: https://iosgods.com/topic/72039-angry-birds-2-cheats-v2600-1-infinite-currencies/
      • 1,960 replies
    • Alien Invasion: RPG Idle Space Cheats v4.18.00 +2
      Modded/Hacked App: Alien Invasion: RPG Idle Space By MULTICAST GAMES LIMITED
      Bundle ID: com.multicastgames.venomSurvive
      iTunes Store Link: https://apps.apple.com/us/app/alien-invasion-rpg-idle-space/id6443697602?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/167591-alien-invasion-rpg-idle-space-v204-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/167589-alien-invasion-rpg-idle-space-cheats-v204-1/
        • Haha
        • Like
      • 414 replies
    • Airport City Cheats v8.39.01 +1
      Modded/Hacked App: Airport City by Game Insight UAB
      Bundle ID: com.gameinsight.airportcity
      iTunes Store Link: https://apps.apple.com/us/app/airport-city/id495637457?uo=4&at=1010lce4


      Hack Features:
      - Free Store


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/126716-arm64-airport-city-v717-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/126714-arm64-airport-city-cheats-v717-1/
        • Agree
        • Winner
        • Like
      • 761 replies
    • Real Boxing 2 Cheats v1.55.2 +3
      Modded/Hacked App: Real Boxing 2 By Vivid Games S.A.
      Bundle ID: com.vividgames.realboxing2
      App Store Link: https://apps.apple.com/us/app/real-boxing-2/id932779605?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
      - No Punch Cooldown

       

      Non-Jailbroken Hack: https://iosgods.com/topic/195702-real-boxing-2-v1550-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/195685-real-boxing-2-cheats-v1550-3/
      • 11 replies
    • Dead Trigger 2 Cheats v2.4.1 +10 [ God Mode & More ]
      Modded/Hacked App: DEAD TRIGGER 2: Zombie Games By Deca Games EOOD
      Bundle ID: com.madfingergames.deadtrigger2
      iTunes Store Link: https://apps.apple.com/us/app/dead-trigger-2-zombie-games/id720063540?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

      - Infinite Ammo
      - No Reload
      - God Mode
      - Infinite Consumable
      - One Hit Kill
      - Drop Hacks
      - Instant Win
      - Better Aim
      - Aimbot
      - Kill All Zombies with 1 Tap

       

      Non-Jailbroken Hack: https://iosgods.com/topic/73791-dead-trigger-2-v230-jailed-cheats-10

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/78126-dead-trigger-2-cheats-v230-10-god-mode-more/
        • Agree
        • Haha
        • Winner
        • Like
      • 2,841 replies
    • Boxing Star: Real Boxing Fight Cheats v7.0.0 +4
      Modded/Hacked App: Boxing Star: Real Boxing Fight By THUMBAGE Co., Ltd
      Bundle ID: com.ftt.boxingstar.gl.ios
      iTunes Store Link: https://apps.apple.com/us/app/boxing-star-real-boxing-fight/id1241887528?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - God Mode
      - One Touch & Win

      Free Non-Jailbroken Hack: https://iosgods.com/topic/92347-boxing-star-real-boxing-fight-v620-jailed-cheats-4/


      Hack Download Link: https://iosgods.com/topic/72805-boxing-star-real-boxing-fight-cheats-v620-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,685 replies
    • [ Chiikawa Pocket JP ] ちいかわぽけっと v1.2.10 Jailed Cheats +3
      Modded/Hacked App: ちいかわぽけっと By Applibot Inc.
      Bundle ID: jp.co.applibot.chiikawapocket
      iTunes Store Link: https://apps.apple.com/jp/app/%E3%81%A1%E3%81%84%E3%81%8B%E3%82%8F%E3%81%BD%E3%81%91%E3%81%A3%E3%81%A8/id6596745408?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - Multiply Attack
      - Custom Speed (Customize before Login or Clear stage to get apply)

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/194281-chiikawa-pocket-jp-%E3%81%A1%E3%81%84%E3%81%8B%E3%82%8F%E3%81%BD%E3%81%91%E3%81%A3%E3%81%A8-v1111-jailed-cheats-3/
      • 24 replies
    • Chiikawa Pocket Cheats v1.2.10 +3
      Modded/Hacked App: Chiikawa Pocket By Applibot Inc.
      Bundle ID: jp.co.applibot.chiikawapocketgl
      iTunes Store Link: https://apps.apple.com/us/app/chiikawa-pocket/id6740838442?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
      - Multiply Attack

       

      Non-Jailbroken Hack: https://iosgods.com/topic/193718-chiikawa-pocket-v111-jailed-cheats-2/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/193717-chiikawa-pocket-cheats-v111-2/
      • 45 replies
    • Real Racing 3 Cheats v13.5.1 +4
      Modded/Hacked App: Real Racing 3 By Electronic Arts Inc.
      Bundle ID: com.ea.realracing3.inc
      iTunes Store Link: https://apps.apple.com/us/app/real-racing-3/id556164008?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

      - Free Store
      - Freeze M$
      - Freeze R$
      - Freeze Gold

      Non-Jailbroken Hack: https://iosgods.com/topic/185163-real-racing-3-v1317-jailed-cheats-4/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/147926-real-racing-3-cheats-v1318-4/
        • Agree
        • Haha
        • Like
      • 1,048 replies
    • Dream League Soccer 2025 v12.240 +12 Cheats
      Modded/Hacked App: Dream League Soccer 2024 By First Touch Games Ltd.
      Bundle ID: com.firsttouch.dls7
      iTunes Store Link: https://apps.apple.com/us/app/dream-league-soccer-2024/id1462911602?uo=4


      Hack Features:
      - Stupid AI
      - No Foul
      - No Injuries
      - No Offside
      - Freeze Stamina
      - No Substitutions Limit
      - No Forfeit Penalty
      - Custom Logo Unlocked
      - Custom Kit Unlocked
      - Unlock Customizations
      - Throw In to End Current Half
      - Freeze Match Clock

      Notes: Play offline if you get kicked out of match.


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

      iOS Hack Download Link: https://iosgods.com/topic/138633-dream-league-soccer-2024-v11230-12-cheats/
        • Informative
        • Agree
        • Haha
        • Winner
        • Like
      • 2,129 replies
    • Subway Surfers Cheats v3.48.10 +5
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?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

      - Free Store (not Free iAP)
      - Free iAP (ViP Only)
      - Unlock Characters Outfit
      - Custom Jump Height
      - No Clip (To end level swipe to left til you get dizzy, swipe again and you will lose)

       

      Non-Jailbroken Hack: https://iosgods.com/topic/119795-subway-surfers-v3425-jailed-cheats-5/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/119793-subway-surfers-cheats-v3430-5/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,334 replies
    • Dice Dreams Cheats v1.93.0 +2
      Modded/Hacked App: Dice Dreams™ By SuperPlay LTD
      Bundle ID: com.superplaystudios.dicedreams
      iTunes Store Link: https://apps.apple.com/us/app/dice-dreams/id1484468651?uo=4


      Hack Features:
      - Custom Rolls
      - Unlimited Coins - afford regardless of if you have enough


      iOS Hack Download Link: https://iosgods.com/topic/138011-dice-dreams%E2%84%A2-v1692-2-cheats/
        • Agree
        • Winner
        • Like
      • 636 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