Jump to content

Hooking method(s) with a dot class in Flex to Tweak.xm


13 posts in this topic

Recommended Posts

Updated (edited)

In some of the apps, when you try to hack a class with a  "." or a dot function.

nKz8Kcz.png

 

Flex to Tweak.xm Tutorial:

https://iosgods.com/topic/904-tutorialvideo-hack-games-with-flex-and-convert-it-to-deb-tweak/

There are more on this kind, check them out!

 

Let's get started!

In Flex, it would work fine, but when you try to convert flex to tweak.xm and make package.

It gives you an error, "error: cannot use dot operator on a type"

*I don't hack this application, it's an example to solve this issue*

 

Using the tutorial, flex to tweak.xm.

I get this,

%hook OkCupid.OKMessage
-(BOOL)read {
return TRUE;
}
%end

It will throw me an error after "make package" command in terminal.

 

A way around the error template:

%hook AnyRandomNameHere
- (id)description {
    return %orig();
}
%end

%ctor {
    %init(AnyRandomNameHere = objc_getClass("ClassNameWithADotHere"));
}

 

Now, I will convert it in this way.

Final Code:

%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end

%ctor {
    %init(CupidMess = objc_getClass("OkCupid.OKMessage"));
};

I saved the file and use "make package" command and it proceed without error!

 

 

Adding 2 or more dot functions Guide

 

 

 

Regular: Throws error


%hook OkCupid.OKMessage
-(BOOL)read {
return TRUE;
}
%end

%hook OkCupid.OKProfileQuestions
-(BOOL)showUnansweredState {
return FALSE;
}
%end

Wrong way:


%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end

%hook CupidQ
-(BOOL)showUnansweredState {
return FALSE;
}
%end

%ctor {
    %init(CupidMess = objc_getClass("OkCupid.OKMessage"));
    %init(CupidQ = objc_getClass("OkCupid.OKProfileQuestions"));
};

Throws "error: re-%init of %group _ungrouped, first initialized at Tweak.xm:xx"

 

A way around the error template:


%hook AnyRandomNameHere
- (id)description {
    return %orig();
}
%end

%hook AnyRandomNameHere2
- (bool)description {
    return %orig();
}
%end

%ctor {
    %init(AnyRandomNameHere = objc_getClass("ClassNameWithADotHere"), AnyRandomNameHere2 = objc_getClass("ClassNameWithADotHere2"));
  	/* Add a comma "," between both function. 
    AnyRandomNameHere = objc_getClass("ClassNameWithADotHere")
    AnyRandomNameHere2 = objc_getClass("ClassNameWithADotHere2")
  	*/
}

 

Final Code:


%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end

%hook CupidQ
-(BOOL)showUnansweredState {
return FALSE;
}
%end


%ctor {
    %init(CupidMess = objc_getClass("OkCupid.OKMessage"), CupidQ = objc_getClass("OkCupid.OKProfileQuestions"));
};

I saved the file and use "make package" command and it proceed without error!

 

 

Credits:

@Amuyea for this tutorial.

@AnotherLurker for this post regard to this issue in Help & Support.

https://iosgods.com/topic/41019-theos-errorswift/?do=findComment&comment=1340552

 

Updated by Amuyea
  • Like 7
  • Winner 2
  • Thanks 2
  • Agree 1
Posted
4 minutes ago, Ted2 said:

Very nice & well explained tutorial! :) 

Thanks :D

  • Agree 1
Posted

i was looking for method to replace the Class Name last night. Thanks @Amuyea

Posted (edited)
1 minute ago, xiaov said:

i was looking for method to replace the Class Name last night. Thanks @Amuyea

You are welcome :p

Updated by Amuyea
Posted (edited)

saved my day

P.S.: Do not use tabulator or other white spaces after "%init(", it will interpret it as an illegal classname (using theos git from 30.01.2018). After the first argument you are free to use what you want for pretty printing.

Updated by wallis
Posted

Thanks! Very nice and understanding tutorial (Y)

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

    • Last Glory - Merge TD v0.7.0 [ +1 Cheats ] Damage Max
      Modded/Hacked App: Last Glory - Merge TD By FUN2EVER GAMES PTE. LTD
      Bundle ID: com.fun2ever.royaldefense.td
      App Store Link: https://apps.apple.com/us/app/last-glory-merge-td/id6803822769?uo=4

      🤩 Hack Features

      - Damage Max
      • 0 replies
    • Last Glory - Merge TD v0.7.0 [ +1 Jailed ] Damage Max
      Modded/Hacked App: Last Glory - Merge TD By FUN2EVER GAMES PTE. LTD
      Bundle ID: com.fun2ever.royaldefense.td
      App Store Link: https://apps.apple.com/us/app/last-glory-merge-td/id6803822769?uo=4

      🤩 Hack Features

      - Damage Max
        • Like
      • 0 replies
    • Shadow Dungeon: Roguelike Game +5 Mods [ Damage & Defence ]
      Mod APK Game Name: Shadow Dungeon: Roguelike Game By Deviloper Limited
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.deviloper.shadow.dungeon

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Move Speed Multiplier
      - Unlimited Silver -> Will increase instead of decrease.
        • Winner
      • 0 replies
    • Darkslayer 2 +5 Jailed Cheats
      Modded/Hacked App: Darkslayer 2 By StudioBreeze
      Bundle ID: com.sb.darkslayersd
      App Store Link: https://apps.apple.com/kr/app/darkslayer-2/id6759081336?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

      - Damage Multiplier
      - Defense Multiplier
      - Attack Speed Multiplier
      - Move Speed Multiplier
      - No ADS

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App







       

      📖 PC Installation Instructions

      STEP 1: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see our iOSGods App IPA Download Tutorial which includes a video example.
      STEP 2: Download Sideloadly and install it on your Windows or Mac.
      STEP 3: Open Sideloadly on your computer, connect your iOS device, and wait until your device name appears in Sideloadly.
      STEP 4: Once your iDevice is recognized, drag the modded .IPA file you downloaded and drop it into the Sideloadly application.
      STEP 5: Enter your Apple Account email, then press “Start.” You’ll then be asked to enter your password. Go ahead and provide the required information.
      STEP 6: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 7: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles / VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 8: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A
        • Agree
        • Haha
        • Winner
        • Like
      • 6 replies
    • Court Six: Volleyball Game v1.0 [ +3 Jailed ] AI Freeze
      Modded/Hacked App: Court Six: Volleyball Game By 67 Game Ideas LLC
      Bundle ID: com.ideas67.courtsix
      App Store Link: https://apps.apple.com/us/app/court-six-volleyball-game/id6816279264?uo=4

      🤩 Hack Features

      - ADD Gem
      - ADD Gold
      - AI Freeze
        • Informative
      • 2 replies
    • Court Six: Volleyball Game v1.0 [ +3 Cheats ] AI Freeze
      Modded/Hacked App: Court Six: Volleyball Game By 67 Game Ideas LLC
      Bundle ID: com.ideas67.courtsix
      App Store Link: https://apps.apple.com/us/app/court-six-volleyball-game/id6816279264?uo=4

      🤩 Hack Features

      - ADD Gem
      - ADD Gold
      - AI Freeze
      • 0 replies
    • Paper Heroes: Territory Battle +6 Mods [ Damage & Defence ]
      Mod APK Game Name: Paper Heroes: Territory Battle By BIT.GAMES
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.bitgames.paperheroes

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Move Speed Multiplier
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      • 0 replies
    • Starguard: Evo Merge TD +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Starguard: Evo Merge TD By ONDI TECHNOLOGY JSC
      Bundle ID: com.ondi.space.defense
      App Store Link: https://apps.apple.com/us/app/starguard-evo-merge-td/id6758495997?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Battle Coins -> Will increase instead of decrease.
        • Like
      • 0 replies
    • Grow Hidden Master +5 Mods [ Damage & Defence ]
      Mod APK Game Name: Grow Hidden Master By Gameduo
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=net.gameduo.kt

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Kill All Enemies
      - No Ads
      • 0 replies
    • Path Walker: Roguelike RPG +6 Mods [ Damage & Defence ]
      Mod APK Game Name: Path Walker: Roguelike RPG By EKGAMES
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=net.ekgames.pathwalker

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Currencies
      - Freeze Energy
      - No Ads
        • Like
      • 0 replies
    • Ultraman: Legend of Heroes 2 +5 Mods [ Damage & Defence ]
      Mod APK Game Name: Ultraman: Legend of Heroes 2 By JoyMore GAME
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.joymore.atmlegend2

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Kill All Enemies
      - No Skill Cooldown
        • Winner
      • 4 replies
    • Oops Ninja: Idle Shuriken RPG +5 Mods [ Damage & Defence ]
      Mod APK Game Name: Oops Ninja: Idle Shuriken RPG By pungpungApp
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.pungpungstudi.ninjakiugi

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Silver
      - No Ads
        • Agree
      • 2 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