Jump to content

Is this int return value correct?


Go to solution Solved by Rook,

11 posts in this topic

Recommended Posts

Posted

I try to make a preference bundle and put this code on my Tweak.xm, but no working. Can anyone help me? What is the problem?

Sorry noob here.

%hook PhoneTabBarController
 
-(int)defaultTabViewType {
if(GetPrefBool(@"kPo")) {
return 4;
}
return %orig;
}

-(int)currentTabViewType {       
if(GetPrefBool(@"kPo")) {
return 4;
}
return %orig;
}

%end
  • Solution
Posted

NeverBeing, on 27 Jun 2015 - 5:01 PM, said:

Nothing, everything done allright

Are the keys and bundle id correct?
Posted (edited)

 After fixing the keys, compilation with no error, but still not work. @@DiDA 

 

I try to convert FLEX to tweak.xm
Here is the FLEX code:

 

Unit Name
Unite for -(int)defaultTabViewType
Target Class
PhoneTabBarController
Target Method
-(int)defaultTabViewType
Return Value (int)
4

Unit Name
Unite for -(int)currentTabViewType
Target Class
PhoneTabBarController
Target Method
-(int)currentTabViewType
Return Value (int)
4

I guess my tweak.xm is not correct, but I don't know 

Updated by NeverBeing
Posted

Yes, it works fine on Flex

I guess it's your Bundle ID then. :dunno:

Posted

I guess it's your Bundle ID then. :dunno:

 

This is patch for Phone.app, then the Bundle ID is com.apple.mobilephone, right?

Yay it works!  :D 

Thank you @@DiDA  (y)  (y)  (y) 

 

I don't know how, after recompile now it works.

I reboot my iPhone btw.

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