Jump to content

need some help with theos


Go to solution Solved by Rook,

11 posts in this topic

Recommended Posts

Posted (edited)

hello can someone please help me with this?
 

16lkyok.png


 
i have tried this

%hook MMImagePickerController
-(void)setMaxImageCount:(int)arg1{
	arg1 = @"999";
	%orig(arg1);
}
%end

and this

%hook MMImagePickerController
-(void)setMaxImageCount:(int)arg1{
	return 999
}
%end

but i keep getting errors like this.

 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
Tweak.xm:11:7: error: assigning to 'int' from incompatible type 'NSString *'
        arg1 = @"999";
             ^ ~~~~~~
1 errors generated.
make[2]: *** [obj/Tweak.xm.fe3034f2.o] Error 1
make[1]: *** [internal-library-all_] Error 2

any help would be nice. I'm trying to learn this.

Updated by djrapman
  • Thanks 1
Posted (edited)

Try this:



%hook MMImagePickerController
-(void)setMaxImageCount:(int)swag /// When there is an argument, you have to name it
{
    %orig(999);
}
%end

Updated by Diiversityyyy
Posted

ok it compile and installs but doesn't work; where as the flex tweak does. heres my tweak.

%hook MMImagePickerController
-(void)setMaxImageCount:(int)arg1
{
	arg1 = 999;
	}
%end

%hook MMImagePickerManagerOptionObj
-(void)setMaxImageCount:(long long)arg2
{

	arg2 = 999;
}
%end

%hook MMFICImageFormat
-(void)setMaxImageCount:(unsigned int)arg3
{
	arg3 = 999;
}
%end
Posted

im still stuck any help pleae

Is your bundle ID correct?

 

Make sure you entered the game's bundle ID in the tweak.

Posted (edited)

heres my files

Makefile

export ARCHS = armv7 arm64
include theos/makefiles/common.mk

TWEAK_NAME = WeChatEnhancer
WeChatEnhancer_FILES = Tweak.xm

include $(THEOS_MAKE_PATH)/tweak.mk

after-install::
	install.exec "killall -9 SpringBoard"

WeChatEnhancer.plist

{ Filter = { Bundles = ( "com.apple.springboard" ); }; }

Tweak.xm

%hook MMImagePickerController
-(int)maxImageCount{
return 999;
}
-(void)setMaxImageCount:(int)arg1 {
    arg1 = 999;
}
%end


%hook MMImagePickerManagerOptionObj
-(long long)maxImageCount {
return 999;
}
-(void)setMaxImageCount:(long long)arg2 {
    arg2 = 999;
}
%end

control

Package: com.marcos.wechatenhancer
Name: WeChat Enhancer
Depends: mobilesubstrate
Version: 0.0.1
Architecture: iphoneos-arm
Description: An awesome MobileSubstrate tweak!
Maintainer: Marcos
Author: Marcos
Section: Tweaks

any ideas whats going wrong? it compiles and installs but doesnt work. I make the same changes in Flex 2 and those work...?

Updated by djrapman
  • Solution
Posted

The "WeChatEnhancer.plist"

 

Is set to use this code on SpringBoard which I'm guessing that's not what you want.

 

 

 

Replace "com.apple.springboard" with this:

 

com.tencent.xin
That should be WeChat's bundle id if I'm not mistaken.

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
×
  • 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