Skip to content
Guest Big Announcement

Is this int return value correct?

Featured Replies

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

Solved by Rook

  • Author

 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

  • Author

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

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.