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

    • Royal Kingdom v19683 +4 Jailed Cheats [ Coins + More ]
      Modded/Hacked App: Royal Kingdom By Dream Games
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/ph/app/royal-kingdom/id1606549505
       

      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Boosters
      - Freeze Moves


      Jailbreak required hack(s): [Mod Menu Hack] Royal Kingdom v3987 +4 Cheats [ Unlimited Coins ] - 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/
      • 137 replies
    • Royal Kingdom v19683 +4 Cheats [ Coins + More ]
      Modded/Hacked App: Royal Kingdom By Dream Games
      Bundle ID: com.dreamgames.royalkingdom
      iTunes Store Link: https://apps.apple.com/ph/app/royal-kingdom/id1606549505
       

      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Boosters
      - Freeze Moves


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Royal Kingdom v3987 +4 Jailed Cheats [ Unlimited Coins ] - Free Non-Jailbroken IPA 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/
      • 88 replies
    • League of Dreamers - My Story v2.1.4 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: League of Dreamers - My Story By Story Inc. Company
      Bundle ID: com.storyincorporate.leagueofdreamers
      iTunes Store Link: https://apps.apple.com/us/app/league-of-dreamers-my-story/id1591679538
       

      Hack Features:
      - 666 Gems -> Earn some then restart the game.
      - 666 Keys -> Earn some then restart the game.
      - Free In-App Purchases -> Allows free in-app purchases.


      Jailbreak required hack(s): [Mod Menu Hack] League of Dreamers - My Story v1.54 +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/
        • Like
      • 172 replies
    • League of Dreamers - My Story v2.1.4 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: League of Dreamers - My Story By Story Inc. Company
      Bundle ID: com.storyincorporate.leagueofdreamers
      iTunes Store Link: https://apps.apple.com/us/app/league-of-dreamers-my-story/id1591679538
       

      Hack Features:
      - 666 Gems -> Earn some then restart the game.
      - 666 Keys -> Earn some then restart the game.
      - Free In-App Purchases


      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/
        • Like
      • 81 replies
    • Power Slap v7.2.6 +2++ Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Power Slap By Rollic Games Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.uncosoft.powerslap
      iTunes Store Link: https://apps.apple.com/us/app/power-slap/id6449244841?uo=4


      Hack Features:
      - Unlimited Everything -> Will increase instead of decrease.
      - Pro Pass Unlocked


      Jailbreak required hack(s): [Mod Menu Hack] Power Slap v0.4.1 +4 Cheats [ Damage & Defence ] - 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/
      • 160 replies
    • Idle Breaker v1.4.0 +5++ Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Idle Breaker By Estoty LLC
      Bundle ID: com.idlesurvivor.game
      iTunes Store Link: https://apps.apple.com/us/app/idle-breaker/id6448195469?uo=4


      Hack Features:
      - Unlimited Everything -> Earn some.
      - Damage Multiplier
      - Health Multiplier
      - Tool Damage Multiplier
      - Move Speed Multiplier


      Jailbreak required hack(s): [Mod Menu Hack] Idle Breaker v1.0.31 +5++ Cheats [ Unlimited Everything ] - 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/
      • 58 replies
    • Power Slap v7.2.6 +2++ Cheats [ Unlimited Everything ]
      Modded/Hacked App: Power Slap By Rollic Games Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.uncosoft.powerslap
      iTunes Store Link: https://apps.apple.com/us/app/power-slap/id6449244841?uo=4


      Hack Features:
      - Unlimited Everything -> Will increase instead of decrease.
      - Pro Pass Unlocked


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Power Slap v0.4.1 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
      • 113 replies
    • Slime Legion v3.3.0 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Slime Legion By Perfeggs
      Bundle ID: com.hero.may.cry.adventure.game
      iTunes Store Link: https://apps.apple.com/us/app/slime-legion/id1664686966
       

      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:
      - Damage Multiplier
      - Defence Multiplier
      - Moves Modifier


      Jailbreak required hack(s): https://iosgods.com/topic/173174-slime-legion-v162-3-cheats-damage-defence/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 156 replies
    • Slime Legion v3.3.0 +3 Cheats [ Damage & Defence ]
      Modded/Hacked App: Slime Legion By Perfeggs
      Bundle ID: com.hero.may.cry.adventure.game
      iTunes Store Link: https://apps.apple.com/us/app/slime-legion/id1664686966
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Moves Modifier


      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/
      • 140 replies
    • Idle Breaker v1.4.0 +5++ Cheats [ Unlimited Everything ]
      Modded/Hacked App: Idle Breaker By Estoty LLC
      Bundle ID: com.idlesurvivor.game
      iTunes Store Link: https://apps.apple.com/us/app/idle-breaker/id6448195469?uo=4


      Hack Features:
      - Unlimited Everything -> Earn some.
      - Damage Multiplier
      - Health Mulitplier
      - Tool Damage Multiplier
      - Speed Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Idle Breaker v1.0.31 +4++ Jailed Cheats [ Unlimited Everything ] - Free Non-Jailbroken IPA 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/
      • 63 replies
    • SpongeBob Adventures: In A Jam v2.23.1 +1++ Jailed Cheats [ Everything ]
      Modded/Hacked App: SpongeBob Adventures: In A Jam By Tilting Point LLC
      Bundle ID: com.tiltingpoint.sbadventures
      iTunes Store Link: https://apps.apple.com/us/app/spongebob-adventures-in-a-jam/id1641251535?uo=4


      Hack Features:
      - Unlimited Everything -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] SpongeBob Adventures: In A Jam +20++ Cheats [ Cheat Menu ] - 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/
      • 135 replies
    • SpongeBob Adventures: In A Jam v2.23.1 +1++ Cheats [ Everything ]
      Modded/Hacked App: SpongeBob Adventures: In A Jam By Tilting Point LLC
      Bundle ID: com.tiltingpoint.sbadventures
      iTunes Store Link: https://apps.apple.com/us/app/spongebob-adventures-in-a-jam/id1641251535?uo=4


      Hack Features:
      - Unlimited Everything -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [No Jailbreak Required] SpongeBob Adventures: In A Jam +20++ Jailed Cheats [ Cheat Menu ] - ViP Non-Jailbroken Hacks & 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/
      • 162 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