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
5 minutes ago, Ted2 said:

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

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

much love for always helpingĀ 

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

    • Immortal Rising 2 v1.4.13 Jailed Cheats +5
      Modded/Hacked App: Immortal Rising 2 By Planetarium Labs Pte. Ltd.
      Bundle ID: com.badbeans.immortalrising2
      iTunes Store Link: https://apps.apple.com/us/app/immortal-rising-2/id6467105374?uo=4

      Ā 

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - SideloadlyĀ /Ā Cydia ImpactorĀ or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      -Ā More damage
      - No CD
      -Ā Earn more gold
      -Ā Earn more exp
      -Ā Freeze combokill
      - God mode
      • 224 replies
    • [Welcome to Dreamland TW] ę­”čæŽä¾†åˆ°å¤¢ęØ‚åœ’ v1.4 Jailed Cheats +5
      Modded/Hacked App: ę­”čæŽä¾†åˆ°å¤¢ęØ‚åœ’ By POSEIDON NET LIMITED
      Bundle ID: com.poseidongame.dsl
      App Store Link: https://apps.apple.com/tw/app/%E6%AD%A1%E8%BF%8E%E4%BE%86%E5%88%B0%E5%A4%A2%E6%A8%82%E5%9C%92/id6748006168?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
      - Auto Win
      Ā 

      Note: If stuck at loading screen report to me for update

      Ā 

      ā¬‡ļøĀ iOS Hack Download IPA Link: https://iosgods.com/topic/203854-welcome-to-dreamland-tw-%E6%AD%A1%E8%BF%8E%E4%BE%86%E5%88%B0%E5%A4%A2%E6%A8%82%E5%9C%92-v13-jailed-cheats-5/
      • 1 reply
    • Harry Potter: Puzzles & Spells v106.0.338 +1 Mod [ Freeze Moves ]
      Mod APK Game Name:Ā Harry Potter: Puzzles & Spells
      Rooted Device: Not Required.
      Google Play Store Link:Ā https://play.google.com/store/apps/details?id=com.zynga.pottermatch&hl=en

      Ā 

      🤩 Hack Features

      -Ā Freeze MovesĀ ->Ā Enable when you have 1 move left to avoid puzzle issues.
      • 10 replies
    • Harry Potter: Puzzles & Spells v107.0.341 +1 Jailed Cheat [ Freeze Moves ]
      Modded/Hacked App: Harry Potter: Puzzles & Spells By Zynga Inc.
      Bundle ID: com.zynga.pottermatch
      iTunes Store Link: https://apps.apple.com/us/app/harry-potter-puzzles-spells/id1434505322?uo=4


      Hack Features:
      -Ā Freeze Moves


      Jailbreak required hack(s):Ā [Mod Menu Hack] Harry Potter: Puzzles & Spells v85.0.271 +1 Cheat [ Unlimited Moves ] - 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
      • 129 replies
    • Spell Arena: Battle Royale v0.8.1 +3++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Spell Arena: Battle Royale By MADCORE GAMES SP Z O O
      Bundle ID: com.tapanywhere.magicarena
      iTunes Store Link: https://apps.apple.com/us/app/spell-arena-battle-royale/id1556673765?uo=4


      Hack Features:
      -Ā Unlimited CurrenciesĀ -> Spend some.
      -Ā Unlimited TrophiesĀ -> Play a match.


      Jailbreak required hack(s):Ā [Mod Menu Hack] Spell Arena: Battle Royale v0.7.15 +3++ 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/
      • 7 replies
    • MU: Pocket Knights v1.4.18 +3 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: MU: Pocket Knights By WEBZEN INC.
      Bundle ID: com.webzen.muidle.ios
      App Store Link: https://apps.apple.com/ph/app/mu-pocket-knights/id6742208743?uo=4

      Ā 
      Ā 

      🤩 Hack Features

      -Ā Damage Multiplier
      -Ā God Mode
      -Ā Speed Multiplier
      • 153 replies
    • Submarine Quest: Merge&Explore v2.2.2 +5 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Submarine Quest: Merge&Explore By KHAOLAM INTERACTIVE COMPANY LIMITED
      Bundle ID: com.khaolam.deepseamerge
      App Store Link: https://apps.apple.com/us/app/submarine-quest-merge-explore/id6738372047?uo=4

      Ā 


      🤩 Hack Features

      -Ā Unlimited CoinsĀ -> Earn or spend some.
      -Ā Unlimited GemsĀ -> Earn or spend some.
      -Ā Unlimited EnergyĀ -> Earn or spend some.
      -Ā Unlock All Character Items
      -Ā Unlock All Equipment Items
      • 4 replies
    • Whispers - Interactive Stories v2.3.17 +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/
      • 314 replies
    • Zombie Harbor: FPS Zombie Game v1.1.6 +12 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Zombie Harbor: FPS Zombie Game By MYGAMES MENA FZ LLC
      Bundle ID: games.my.zombie.shooter.fps
      App Store Link: https://apps.apple.com/us/app/zombie-harbor-fps-zombie-game/id6744439436?uo=4

      Ā 
      Ā 

      🤩 Hack Features

      -Ā Freeze Currencies
      -Ā Freeze Ammo
      -Ā No Recoil
      -Ā No Spread
      -Ā Increased Fire Rate

      VIP
      -Ā Damage Multiplier
      -Ā Defence Multiplier
      -Ā God Mode
      -Ā Move Speed Multiplier
      -Ā Unlimited Currencies
      -Ā Kill All Enemies
      -Ā Become Invisible
      • 17 replies
    • ģš°ģ£¼ź²½ģ°°ė“¤: 탈옄수 ģ²“ķ¬ģž‘ģ „ Space Cops: Fugitive Hunt v1.0.36 [ +5 Cheats ] Currency Max
      Modded/Hacked App: ģš°ģ£¼ź²½ģ°°ė“¤: 탈옄수 ģ²“ķ¬ģž‘ģ „ By Double Minor Co., Ltd
      Bundle ID: com.doubleminor.SpaceCowboys
      App Store Link: https://apps.apple.com/kr/app/%EC%9A%B0%EC%A3%BC%EA%B2%BD%EC%B0%B0%EB%93%A4-%ED%83%88%EC%98%A5%EC%88%98-%EC%B2%B4%ED%8F%AC%EC%9E%91%EC%A0%84/id6755414827?uo=4

      🤩 Hack Features

      - Unlimited Gems
      -Ā Unlimited Gold
      -Ā Unlimited Golden Keys
      -Ā Unlimited Silver Keys
      -Ā Unlimited EXP / Faster LvL UP
      • 4 replies
    • ģš°ģ£¼ź²½ģ°°ė“¤: 탈옄수 ģ²“ķ¬ģž‘ģ „ Space Cops: Fugitive Hunt v1.0.36 [ +5 Jailed ] Currency Max
      Modded/Hacked App: ģš°ģ£¼ź²½ģ°°ė“¤: 탈옄수 ģ²“ķ¬ģž‘ģ „ By Double Minor Co., Ltd
      Bundle ID: com.doubleminor.SpaceCowboys
      App Store Link: https://apps.apple.com/kr/app/%EC%9A%B0%EC%A3%BC%EA%B2%BD%EC%B0%B0%EB%93%A4-%ED%83%88%EC%98%A5%EC%88%98-%EC%B2%B4%ED%8F%AC%EC%9E%91%EC%A0%84/id6755414827?uo=4

      🤩 Hack Features

      - Unlimited Gems
      -Ā Unlimited Gold
      -Ā Unlimited Golden Keys
      -Ā Unlimited Silver Keys
      -Ā Unlimited EXP / Faster LvL UP
      • 3 replies
    • Narin Secrets of Dwarvenia v1.0.3 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Narin By 1DER Entertainment s.r.o
      Bundle ID: com.OsOs.Narin
      App Store Link: https://apps.apple.com/us/app/narin/id6754609794?uo=4

      🤩 Hack Features

      - Unlimited Gems
      -Ā Unlimited Gold
      -Ā Unlimited Inventory Items
      • 6 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