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

    • 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/
      • 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/
      • 636 replies
    • Battle Legion - Mass Battler Cheats v4.3.6 +4
      Modded/Hacked App: Battle Legion - Mass Battler By GODSPEED GAMING SOLUTIONS PRIVATE LIMITED
      Bundle ID: com.traplight.battleslides
      iTunes Store Link: https://apps.apple.com/us/app/battle-legion-mass-battler/id1435133042?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

      - Multiply Attack
      - Multiply Defense
      - Instant Win
      - Enemies Don't Move
      - Enemies Don't Attack

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/129669-battle-legion-mass-battler-cheats-v424-4/
      • 573 replies
    • The Walking Dead: All-Stars Cheats v1.39.2 +4
      Modded/Hacked App: The Walking Dead: All-Stars By Com2uS Holdings Corporation
      Bundle ID: com.gamevil.gvtwd.ios.apple.global.normal
      iTunes Store Link: https://apps.apple.com/us/app/the-walking-dead-all-stars/id1570395238?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - God Mode
      - Auto Win
       

      iOS Hack Download Link: https://iosgods.com/topic/186370-the-walking-dead-all-stars-cheats-v1292-4/
      • 111 replies
    • Grim Soul: Survival v7.4.0 +19 Cheats [Unlimited Currencies + More]
      Modded/Hacked App: Grim Soul: Survival By Andrey Pryakhin
      Bundle ID: fantasy.survival.game.rpg
      iTunes Store Link: https://itunes.apple.com/us/app/grim-soul-survival/id1366215798


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Unlimited Thalers/Coins & Crafting Points - Once enabled, purchase something using coins & use a craft point so the currencies stick, then disable this feature.
      - Unlimited Storage Items - Taking storage items will increase them.
      - Unlimited Energy / Instant Energy Refills - Will refill your energy once you run to another location.
      - Godmode - Unlinked. Health will still decrease but you won't die.
      - One-Hit Kill - Linked to the enemy. Would recommend enabling 'Godmode'.
      - Increased Attack Range - Allows you to kill enemies from some distance away.
      - Free Crafting - Will allow you to craft items without the required materials.
      - No Crafting Level Requirement
      - Free Construction
      - Items Duplicate When Split
      - Unlimited Item Durability
      - x2 Player Speed
      - x3 Player Speed
      • 5,057 replies
    • HEIR OF LIGHT: ECLIPSE Cheats v1.22.3 +4
      Modded/Hacked App: HEIR OF LIGHT: ECLIPSE By Com2uS Holdings Corporation
      Bundle ID: com.com2usholdings.heiroflight2.ios.apple.global.normal
      iTunes Store Link: https://apps.apple.com/us/app/heir-of-light-eclipse/id1672238868?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

      - Multiply Attack
      - Multiply Defense
      - God Mode
      - Auto Win

      DO NOT BUY VIP FOR JUST THIS CHEAT

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/192905-heir-of-light-eclipse-cheats-v1192-4/
      • 21 replies
    • Gran Saga Idle:KNIGHTSxKNIGHTS Cheats v1.34.2 +2
      Modded/Hacked App: Gran Saga Idle:KNIGHTSxKNIGHTS By Kakao Games Corp.
      Bundle ID: com.piedpixels.gransagaidle
      iTunes Store Link: https://apps.apple.com/us/app/gran-saga-idle-knightsxknights/id6482985104?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

      - Multiply Attack
      - Multiply Defense

       

      Non-Jailbroken Hack: https://iosgods.com/topic/188857-gran-saga-idleknightsxknights-v1250-jailed-cheats-2/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/182761-gran-saga-idleknightsxknights-cheats-v1262-2/
        • Thanks
      • 261 replies
    • RPG AVABEL ONLINE Cheats v12.0.4 - [ God Mode & More ]
      Modded/Hacked App: RPG AVABEL ONLINE By ASOBIMO,Inc.
      Bundle ID: com.asobimo.AvabelOnline
      iTunes Store Link: https://itunes.apple.com/us/app/rpg-avabel-online/id606800657
       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - God Mode 
      - Cast Speed Multiplier
      - Charge Speed Multiplier
      - Approach Speed Multiplier
      - No Roll CoolDown
      - No Skills CoolDown

      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app. This hack works on the latest x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
      • 2,156 replies
    • Hardcore Leveling Warrior Cheats v1.4.1 +5
      Modded/Hacked App: Hardcore Leveling Warrior By SuperPlanet corp.
      Bundle ID: com.superplanet.lucid3.global
      iTunes Store Link: https://apps.apple.com/us/app/hardcore-leveling-warrior/id6737226714?uo=4

      Hack Features

      - God Mode 
      - One Hit Kill
      - Multiply Attack
      - Multiply Defense
      - PREMIUM (No Ads, Speed, etc ..)


      For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
       

      iOS Hack Download Link https://iosgods.com/topic/191048-hardcore-leveling-warrior-cheats-v111-5/
      • 81 replies
    • BitLife - Life Simulator Cheats v3.19.3 +2
      Modded/Hacked App: BitLife - Life Simulator by Candywriter, LLC
      Bundle ID: com.wtfapps.apollo16
      iTunes Store Link: https://apps.apple.com/us/app/bitlife-life-simulator/id1374403536?uo=4&at=1010lce4


      Hack Features:
      - Infinite Cash
      - Free Bitizen Purchase (Press Cancle) - Work for All Versions


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/84167-arm64-bitlife-life-simulator-v1412-jailed-cheats-2/


      Hack Download Link: https://iosgods.com/topic/84223-arm64-bitlife-life-simulator-cheats-all-versions-2/
      • 3,608 replies
    • Harry Potter: Hogwarts Mystery v6.6.1 - [ Unlimited Energy & More ]
      Modded/Hacked App: Harry Potter: Hogwarts Mystery By Jam City, Inc.
      Bundle ID: com.tinyco.potter
      iTunes Store Link: https://apps.apple.com/us/app/harry-potter-hogwarts-mystery/id1333256716


      Hack Features:
      - Unlimited Energy
      - Max Attributes Level
      - Free Shop - Energy & Some Pets 
      - Max Creature Mastery Level
      - Unlimited Gems - Do Task And You'll Gain Gems
      - Feeding Button Enabled
      • 878 replies
    • Stick War: Legacy Cheats v2023.5.1212 +3
      Modded/Hacked App: Stick War: Legacy by 1004319 Alberta Ltd
      Bundle ID: com.stickpage.stickwar
      iTunes Store Link: https://itunes.apple.com/us/app/stick-war-legacy/id1001780528?mt=8&uo=4&at=1010lce4


      Hack Features:
      - Infinite Gold
      - Infinite Gem
      - Fast Build


      Hack Download Link: https://iosgods.com/topic/96767-arm64-stick-war-legacy-cheats-all-versions-3/
      • 377 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