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

  On 12/14/2017 at 9:41 PM, TheHackingFreak said:

I already have that in my make files and tweak xm 

as of sdks 

ive got iOS 9.3 and 10.1

Expand  

 

  On 12/14/2017 at 9:37 PM, 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?

Expand  

 

Posted
  On 12/14/2017 at 10:19 PM, 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 ?

Expand  

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

Posted
  On 12/14/2017 at 10:26 PM, TheHackingFreak said:

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

much love for always helping 

Expand  

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

    • Arena Heroes: Online RPG v1.9.0 [ +2 Cheats ] Skill CD
      Modded/Hacked App: Arena Heroes: Online RPG By INFUSION GAMES OU
      Bundle ID: com.infusiongames.fighting.rpg.adventure.multiplayer.wars.pvp.battles.arena.heroes
      iTunes Store Link: https://apps.apple.com/us/app/arena-heroes-online-rpg/id6448993010?uo=4
       

      🤩 Hack Features

      - DMG [ When Enemy Turn Disable ]
      - Skill CD



      DMG Not Tested With Dungeon & Arena 
        • Agree
        • Haha
        • Winner
        • Like
      • 20 replies
    • Arena Heroes: Online RPG v1.9.0 [ +2 Jailed ] Skill CD
      Modded/Hacked App: Arena Heroes: Online RPG By INFUSION GAMES OU
      Bundle ID: com.infusiongames.fighting.rpg.adventure.multiplayer.wars.pvp.battles.arena.heroes
      iTunes Store Link: https://apps.apple.com/us/app/arena-heroes-online-rpg/id6448993010?uo=4


      🤩 Hack Features

      - DMG [ When Enemy Turn Disable ]
      - Skill CD



      DMG Not Tested With Dungeon & Arena 
        • Informative
        • Winner
        • Like
      • 11 replies
    • Dream Resort - Match 3 Games v1.3.8 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Dream Resort - Match 3 Games By F.O.G LIMITED
      Bundle ID: com.dream.resort.candy.match.mania.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-resort-match-3-games/id6737011572?uo=4
       

      🚀 Hack Features

      - Auto ADS Disable

      - Coins

      - Diamonds

      - Lives Cost

      - Moves Freeze

      - Booster [ Buy Get Unlimited After use Then work ]

      - Auto win 


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Winner
        • Like
      • 11 replies
    • Dream Resort - Match 3 Games v1.3.8 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Dream Resort - Match 3 Games By F.O.G LIMITED
      Bundle ID: com.dream.resort.candy.match.mania.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-resort-match-3-games/id6737011572?uo=4

       

      🔧 Mod Requirements

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

       

      🚀 Hack Features

      - Auto ADS Disable

      - Coins

      - Diamonds

      - Lives Cost

      - Moves Freeze

      - Booster [ Buy Get Unlimited After use Then work ]

      - Auto win 


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Thanks
        • Like
      • 12 replies
    • Heroes vs. Hordes: Survivor v3.9.0 [ +11 Cheats ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?uo=4

       
      Hack Features

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO

       
      For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Agree
        • Thanks
        • Winner
        • Like
      • 59 replies
    • Heroes vs. Hordes: Survivor v3.9.0 [ +11 Jailed ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?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

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO


      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
        • Agree
        • Thanks
        • Winner
        • Like
      • 72 replies
    • Slot Clash! v1.2 [+3 Cheats]
      Modded/Hacked App: Slot Clash! By Handan Simay Okcu
      Bundle ID: com.game.slotclash
      App Store Link: https://apps.apple.com/us/app/slot-clash/id6740770886?uo=4



      🤩 Hack Features

      - Never Die
      - Add Currency (Enable and spend)
      - Add Battle Currency (Enable inside battle and spend)
        • Like
      • 0 replies
    • Slot Clash! v1.2 [+3 Jailed Cheats]
      Modded/Hacked App: Slot Clash! By Handan Simay Okcu
      Bundle ID: com.game.slotclash
      App Store Link: https://apps.apple.com/us/app/slot-clash/id6740770886?uo=4



      🤩 Hack Features

      - Never Die
      - Add Currency (Enable and spend)
      - Add Battle Currency (Enable inside battle and spend)
      • 1 reply
    • Crossy Road v7.3 +5 Jailed Cheats [ Unlimited Coins ]
      Modded/Hacked App: Crossy Road By Hipster Whale Pty Ltd
      Bundle ID: com.hipsterwhale.crossy
      iTunes Store Link: https://apps.apple.com/us/app/crossy-road/id924373886?uo=4


      Hack Features:
      - Unlimited Coins -> Earn some.
      - God Mode
      - Score Hack -> Earn 100 points for every jump.
      -- All Characters Unlocked
      -- No Ads


      Jailbreak required hack(s): [Mod Menu Hack] Crossy Road v6.5.0 +5 Cheats [ Unlimited Coins ] - 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
        • Haha
        • Thanks
        • Winner
        • Like
      • 49 replies
    • Whispers - Interactive Stories v2.3.0 +2 Jailed Cheats [ Free Choices ]
      Modded/Hacked App: Whispers: Interactive Stories By GAMEHAUS LIMITED
      Bundle ID: com.twincat.stories
      iTunes Store Link: https://apps.apple.com/us/app/whispers-interactive-stories/id1546336250
       

      Hack Features:
      - All Chapters Unlocked
      - Free Premium Choices


      Jailbreak required hack(s): [Mod Menu Hack] Whispers: Interactive Stories v1.4.9 +2 Cheats [ Free Choices ] - 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
        • Haha
        • Thanks
        • Winner
        • Like
      • 280 replies
    • Whispers - Interactive Stories v2.3.0 +2 Cheats [ Free Choices ]
      Modded/Hacked App: Whispers: Interactive Stories By GAMEHAUS LIMITED
      Bundle ID: com.twincat.stories
      iTunes Store Link: https://apps.apple.com/us/app/whispers-interactive-stories/id1546336250
       

      Hack Features:
      - All Chapters Unlocked
      - Free Premium Choices


      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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 173 replies
    • Smashero.io - Hack N Slash RPG v1.17.1 +2 Jailed Cheats [ God / O-HK ]
      Modded/Hacked App: Smashero.io - Hack N Slash RPG By CANNON CRACKER, Inc.
      Bundle ID: com.cc.Smashero
      iTunes Store Link: https://apps.apple.com/us/app/smashero-io-hack-n-slash-rpg/id6505129091?uo=4


      Hack Features:
      - God Mode
      - One-Hit Kill


      Jailbreak required hack(s): [Mod Menu Hack] Smashero.io - Hack N Slash RPG v3.3 +2 Cheats [ God / O-HK ] - 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/
        • Agree
        • Thanks
        • Winner
        • Like
      • 30 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