Jump to content

How do you write in code a BOOL with argument and return value


Go to solution Solved by ITz_kser,

29 posts in this topic

Recommended Posts

  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted (edited)

Isnt it pass-through by default?

well if it is do you write argument under return value? also forgot to mention that it is a bool with a return value and int with an argument #1

Updated by GodlyOne
Posted

k thx heres the code: i seem to be getting something wrong when i make as well:

%hook CRCredentialManager
-(BOOL)isPremiumForMediaType:(int) {
return TRUE;
}
%end

%hook CRUser
-(BOOL)isPremiumForMediaType:(int) {
return TRUE;
}
%end

%hook CRPurchaseManager
-(BOOL)hasPremiumProduct {
return TRUE;
}
-(BOOL)hasPremiumPlusProduct {
return TRUE;
}
%end

%hook CRPhoneMediaViewController
-(BOOL)userIsPremium {
return TRUE;
}
%end

Posted

 

k thx heres the code: i seem to be getting something wrong when i make as well:

%hook CRCredentialManager
-(BOOL)isPremiumForMediaType:(int) {
return TRUE;
}
%end

%hook CRUser
-(BOOL)isPremiumForMediaType:(int) {
return TRUE;
}
%end

%hook CRPurchaseManager
-(BOOL)hasPremiumProduct {
return TRUE;
}
-(BOOL)hasPremiumPlusProduct {
return TRUE;
}
%end

%hook CRPhoneMediaViewController
-(BOOL)userIsPremium {
return TRUE;
}
%end

Hm, I can't see whats wrong...

 

go to terminal and write this:

 

 

make package &>> error.txt

 

then go to your project folder and open error.txt, copy all of it and paste it here.

Posted (edited)

@@DiDA @@Zimon

 

/var/mobile/crunchyrollv2510/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/crunchyrollv2510/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak crunchyrollv2510...
Preprocessing Tweak.xm...
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Constants from lexical variables potentially modified elsewhere are deprecated at /private/var/theos/bin/lib/aliased.pm line 42.
Compiling Tweak.xm...
Tweak.xm:2:117: error: expected class member or base class name
static BOOL _logos_method$_ungrouped$CRCredentialManager$isPremiumForMediaType(CRCredentialManager* self, SEL _cmd):(int) {
^
Tweak.xm:2:117: error: expected '{' or ','
Tweak.xm:2:116: error: only constructors take base initializers
static BOOL _logos_method$_ungrouped$CRCredentialManager$isPremiumForMediaType(CRCredentialManager* self, SEL _cmd):(int) {
^
Tweak.xm:8:91: error: expected class member or base class name
static BOOL _logos_method$_ungrouped$CRUser$isPremiumForMediaType(CRUser* self, SEL _cmd):(int) {
^
Tweak.xm:8:91: error: expected '{' or ','
Tweak.xm:8:90: error: only constructors take base initializers
static BOOL _logos_method$_ungrouped$CRUser$isPremiumForMediaType(CRUser* self, SEL _cmd):(int) {
^
6 errors generated.
make[2]: *** [obj/Tweak.xm.7caf8c0e.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [crunchyrollv2510.all.tweak.variables] Error 2

Updated by GodlyOne
  • Solution
Posted

Sorry, I'm new to hacking myself, I'll tag people who can help you with this.

 

I don't understand :/

 

@DiDA

@shmoo

@Johnkittz

@--Techarmor--

 

You'll get help soon!

Hey don't forgot me i know how to hack with MShook :ermm:

k thx heres the code: i seem to be getting something wrong when i make as well:

 

%hook 

%hook CRUser
-(BOOL)isPremiumForMediaType:(int) {
return TRUE;
}
%end

%hook CRPurchaseManager
-(BOOL)hasPremiumProduct {
return TRUE;
}
-(BOOL)hasPremiumPlusProduct {
return TRUE;
}
%end

%hook CRPhoneMediaViewController
-(BOOL)userIsPremium {
return TRUE;
}
%end
Write it like this

CRCredentialManager
-(BOOL)isPremiumForMediaType:(int)arg1 {
return TRUE;
%orig(arg1);
}
%end
And if you want to return the arg1 just make it like this

CRCredentialManager
-(BOOL)isPremiumForMediaType:(int)arg1 {
return TRUE;
arg1 = 99999;
%orig(arg1);
}
%end
Also you can change the arg1 to any name you want :)

and let's say you have more than 1 argument

CRCredentialManager
-(BOOL)isPremiumForMediaType:(int)arg1:(BOOL)arg2 {
return TRUE;
arg1 = 9999;
%orig(arg1, arg2)
}
%end
^_^
Posted

Hey don't forgot me i know how to hack with MShook :ermm:

Write it like this

CRCredentialManager
-(BOOL)isPremiumForMediaType:(int)arg1 {
return TRUE;
%orig(arg1);
}
%end
And if you want to return the arg1 just make it like this

CRCredentialManager
-(BOOL)isPremiumForMediaType:(int)arg1 {
return TRUE;
arg1 = 99999;
%orig(arg1);
}
%end
Also you can change the arg1 to any name you want :)

and let's say you have more than 1 argument

CRCredentialManager
-(BOOL)isPremiumForMediaType:(int)arg1:(BOOL)arg2 {
return TRUE;
arg1 = 9999;
%orig(arg1, arg2)
}
%end
^_^

 

thx a lot man but for the last one where u had 2 arguments wheres the second argument i can only see 1 also why do you call back the argument originally?

Posted (edited)

thx a lot man but for the last one where u had 2 arguments wheres the second argument i can only see 1 also why do you call back the argument originally?

He only showed you the second argument as an example for future purpose. 

Updated by Pro

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

    • Zombie Fortress: Trap Defense v0.8.0 [+6 Jailed Cheats]
      Modded/Hacked App: Zombie Fortress: Trap Defense By SayGames LTD
      Bundle ID: com.nlabsoft.zombiecrusher.s
      App Store Link: https://apps.apple.com/us/app/zombie-fortress-trap-defense/id6747713523?uo=4



      🤩 Hack Features

      - Add Cash
      - Add Diamond
      - Add Energy
      - Add Parts
      - Never Die
      - Add Battle Gold (Enable inside battle)
        • Winner
      • 3 replies
    • Zombie Fortress: Trap Defense v0.8.0 [+6 Cheats]
      Modded/Hacked App: Zombie Fortress: Trap Defense By SayGames LTD
      Bundle ID: com.nlabsoft.zombiecrusher.s
      App Store Link: https://apps.apple.com/us/app/zombie-fortress-trap-defense/id6747713523?uo=4



      🤩 Hack Features

      - Add Cash
      - Add Diamond
      - Add Energy
      - Add Parts
      - Never Die
      - Add Battle Gold (Enable inside battle)
        • Winner
      • 1 reply
    • Heroes Crew: Strategy Defense v1.1.5 [+6 Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
        • Winner
        • Like
      • 31 replies
    • Heroes Crew: Strategy Defense v1.1.5 [+6 Jailed Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
        • Informative
        • Agree
        • Winner
        • Like
      • 15 replies
    • Candy Pop Story : Match 3 v1.23.0722 [ +3 Cheats ] Auto Win
      Modded/Hacked App: Candy Pop Story : Match 3 By F.O.G LIMITED
      Bundle ID: com.gamoper.candysweetstory.ios
      App Store Link: https://apps.apple.com/us/app/candy-pop-story-match-3/id6670773988?uo=4


      🤩 Hack Features

      - Auto Win
      - Coins
      - Moves
      -
        • Thanks
      • 6 replies
    • Candy Pop Story : Match 3 v1.23.0722 [ +3 Jailed ] Auto Win
      Modded/Hacked App: Candy Pop Story : Match 3 By F.O.G LIMITED
      Bundle ID: com.gamoper.candysweetstory.ios
      App Store Link: https://apps.apple.com/us/app/candy-pop-story-match-3/id6670773988?uo=4
       

      🤩 Hack Features

      - Auto Win
      - Coins
      - Moves
        • Winner
        • Like
      • 6 replies
    • Boom Castle Tower Defense TD v1.5.2 [ +7 Jailed ] Easy Win
      Modded/Hacked App: Boom Castle: Tower Defense TD By Terahype s.r.o.
      Bundle ID: castle.heroes.tower.defense.kingdom.magic.battle.archer
      iTunes Store Link: https://apps.apple.com/us/app/boom-castle-tower-defense-td/id6502820312?uo=4


      Hack Features:

      - Enemy Status [ HP DEF ]

      - Base HP 

      - Battle Cost 0 

      - Stage Unlocked [ Play Any Stage ]

      - Battle Pass Unlocked 

      - Battle Pass Claim Unlimited [ Gems Gold ]

      - iGG Speed Hack Max 0 - 10 [ Skill CD - ATK Speed - Animation Speed - Wave Faster ]


      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/
        • Informative
        • Agree
        • Winner
        • Like
      • 48 replies
    • Boom Castle Tower Defense TD v1.5.2 [ +7 Cheats ] Easy Win
      Modded/Hacked App: Boom Castle: Tower Defense TD By Terahype s.r.o.
      Bundle ID: castle.heroes.tower.defense.kingdom.magic.battle.archer
      iTunes Store Link: https://apps.apple.com/us/app/boom-castle-tower-defense-td/id6502820312?uo=4


      Hack Features:
      - Enemy Status [ HP DEF ]

      - Base HP 

      - Battle Cost 0 

      -  Stage Unlocked [ Play Any Stage ]

      - Battle Pass Unlocked 

      - Battle Pass Claim Unlimited [ Gems Gold ]

      - iGG Speed Hack Max 0 - 10 [ Skill CD - ATK Speed - Animation Speed - Wave Faster ] 


      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
      • 52 replies
    • Zombie Infinity v1.9.1 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Zombie Infinity By kamasu.jp Inc.
      Bundle ID: jp.kamasu.oread
      App Store Link: https://apps.apple.com/ph/app/zombie-infinity/id6736433765?uo=4


      🤩 Hack Features

      - ADS Pass

      - Energy Pass

      - Premium Pass

      - Currency

      - Hero Status [ HP - DMG ]
        • Thanks
        • Like
      • 4 replies
    • Zombie Infinity v1.9.1 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Zombie Infinity By kamasu.jp Inc.
      Bundle ID: jp.kamasu.oread
      App Store Link: https://apps.apple.com/ph/app/zombie-infinity/id6736433765?uo=4


      🤩 Hack Features

      - ADS Pass

      - Energy Pass

      - Premium Pass

      - Currency

      - Hero Status [ HP - DMG ]
        • Like
      • 3 replies
    • Alien Survivor: Survival Arena v1.40.0 [ +7 Cheats ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4
       

      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 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
        • Agree
        • Haha
        • Winner
        • Like
      • 19 replies
    • Alien Survivor: Survival Arena v1.40.0 [ +7 Jailed ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4


      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 32 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