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

    • Stick Cricket Clash v2.0.0 [ +3 Jailed ] Currency Freeze
      Modded/Hacked App: Stick Cricket Clash By Stick Sports Ltd
      Bundle ID: com.sticksports.stickcricketclash
      iTunes Store Link: https://apps.apple.com/us/app/stick-cricket-clash/id6444344271?uo=4


      Hack Features:
      - Currency Freeze
      - Score [ Win All Match ]
      - Ads Reward 


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Haha
        • Winner
        • Like
      • 15 replies
    • Stick Cricket Clash v2.0.0 [ +3 Cheats ] Currency Freeze
      Modded/Hacked App: Stick Cricket Clash By Stick Sports Ltd
      Bundle ID: com.sticksports.stickcricketclash
      iTunes Store Link: https://apps.apple.com/us/app/stick-cricket-clash/id6444344271?uo=4



      Hack Features:
      - Currency Freeze
      - Score Win All Match
      - Ads Reward 



      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
        • Thanks
        • Winner
        • Like
      • 42 replies
    • Idle pocket monster:pet island v1.0.14 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Idle pocket monster:pet island By Oneorwa Technology Co.,Ltd.
      Bundle ID: com.oneorwa.idlepocketmonster
      App Store Link: https://apps.apple.com/us/app/idle-pocket-monster-pet-island/id6744893380?uo=4


      🤩 Hack Features

      - Currency
      - Resources

        • Agree
        • Thanks
        • Like
      • 6 replies
    • Idle pocket monster:pet island v1.0.14 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Idle pocket monster:pet island By Oneorwa Technology Co.,Ltd.
      Bundle ID: com.oneorwa.idlepocketmonster
      App Store Link: https://apps.apple.com/us/app/idle-pocket-monster-pet-island/id6744893380?uo=4


      🤩 Hack Features

      - Currency
      - Resourecs
        • Like
      • 4 replies
    • Castle Crush-Match 3 v2.15.0 [ +6 Jailed ] Auto Win
      Modded/Hacked App: Castle Crush-Match 3 By KIWI MIBO NETWORK TECHNOLOGY CO.,LIMITED
      Bundle ID: com.mibo.castlecrush.apple
      iTunes Store Link: https://apps.apple.com/us/app/castle-crush-match-3/id1663431964?uo=4


      Hack Features

      - Coins

      - Lives

      - Stars

      - Moves Freeze

      - Booster

      - Auto Win [ Just Hit Target ]


      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Like
      • 18 replies
    • Castle Crush-Match 3 v2.15.0 [ +6 Cheats ] Auto Win
      Modded/Hacked App: Castle Crush-Match 3 By KIWI MIBO NETWORK TECHNOLOGY CO.,LIMITED
      Bundle ID: com.mibo.castlecrush.apple
      iTunes Store Link: https://apps.apple.com/us/app/castle-crush-match-3/id1663431964?uo=4


      Hack Features

      - Coins

      - Lives

      - Stars

      - Moves Freeze

      - Booster

      - Auto Win [ Just Hit Target ]


      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/
        • Informative
        • Like
      • 23 replies
    • Match Villains v1.31.0 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Match Villains By Good Job Games Bilisim Yazilim ve Pazarlama AS
      Bundle ID: com.goodjobgames.matchvillains
      iTunes Store Link: https://apps.apple.com/us/app/match-villains/id6479752688?uo=4
       

      🚀 Hack Features

      - Coins
      - Lives
      - Moves Freeze
      - Booster


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Like
      • 18 replies
    • Match Villains v1.31.0 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Match Villains By Good Job Games Bilisim Yazilim ve Pazarlama AS
      Bundle ID: com.goodjobgames.matchvillains
      iTunes Store Link: https://apps.apple.com/us/app/match-villains/id6479752688?uo=4
       

      🚀 Hack Features

      - Coins
      - Lives
      - Moves Freeze
      - Booster


      🍏 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
        • Like
      • 22 replies
    • Solitaire Grand Harvest v2.394.0 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Solitaire Grand Harvest By Supertreat GmbH
      Bundle ID: net.supertreat.solitaire
      App Store Link: https://apps.apple.com/us/app/solitaire-grand-harvest/id1223338261?uo=4


      🤩 Hack Features

      - Coins
      - Free Ticket
      - Free Undo
      - Wild Card
        • Thanks
        • Winner
        • Like
      • 10 replies
    • Solitaire Grand Harvest v2.394.0 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Solitaire Grand Harvest By Supertreat GmbH
      Bundle ID: net.supertreat.solitaire
      App Store Link: https://apps.apple.com/us/app/solitaire-grand-harvest/id1223338261?uo=4


      🤩 Hack Features

      - Coins
      - Free Ticket
      - Free Undo
      - Wild Card
        • Informative
        • Like
      • 11 replies
    • Gear Hill Customs v2025.7.354 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Gear Hill Customs By DieNo Games Oy
      Bundle ID: com.ssggamestudio.resourcemerge
      App Store Link: https://apps.apple.com/us/app/gear-hill-customs/id6503343757?uo=4
       

      🤩 Hack Features

      - Gems [ Buy Energy Disable After Unlimited ]

      - Cash [ Quest rewards ]

      - Energy Cost 0

      - Resources Cost 0

      - Stock Unlimted

      Note:- When You Hack Gems Then Disable [ Energy & Resoures ] After Hacked Use Both Option
        • Like
      • 10 replies
    • Gear Hill Customs v2025.7.354 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Gear Hill Customs By DieNo Games Oy
      Bundle ID: com.ssggamestudio.resourcemerge
      App Store Link: https://apps.apple.com/us/app/gear-hill-customs/id6503343757?uo=4
       

      🤩 Hack Features

      - Gems [ Buy Energy Disable After Unlimited ]

      - Cash [ Quest rewards ]

      - Energy Cost 0

      - Resources Cost 0

      - Stock Unlimted

      Note:- When You Hack Gems Then Disable [ Energy & Resoures ] After Hacked Use Both Option
        • Like
      • 13 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