Code in my tweak:
NSLog(@"CNSDebug: %@, %@, %@", [self _valueOfNotificationType:0x10 forSectionInfo:[self.specifier propertyForKey:@"BBSECTION_INFO_KEY"]] , self, [self.specifier propertyForKey:@"BBSECTION_INFO_KEY"]);
What the log prints:
Oct 24 19:45:51 FunMaker-5 Preferences[2424]: CNSDebug: 0, <BulletinBoardAppDetailController 0x182b6200: navItem <UINavigationItem: 0x18884270>, view <UITableView: 0x182b7c00; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0x1887a610>; layer = <CALayer: 0x188796d0>; contentOffset: {0, -64}; contentSize: {320, 659.5}>>, <BBSectionInfo: 0x175e9d60> Section com.alipay.iphoneclient 'Alipay': shows in NC = NO, Alert style = Banner, Lockscreen = YES, External = YES, Push settings = [s:BSA] [e:BSA], allows notifications = YES
Note that the process is Preferences; the return value is 0; the BulletinBoardAppDetailController object and BBSectionInfo object are at memory address 0x182b6200 and 0x175e9d60 respectively.
Now let me call the same method with the same caller and arguments in Cycript:
FunMaker-5:~ root# cycript -p Preferences
cy# controller = #0x182b6200
#"<BulletinBoardAppDetailController 0x182b6200: navItem <UINavigationItem: 0x18884270>, view <UITableView: 0x182b7c00; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0x1887a610>; layer = <CALayer: 0x188796d0>; contentOffset: {0, 0}; contentSize: {320, 659.5}>>"
cy# sectionInfo = #0x175e9d60
#"<BBSectionInfo: 0x175e9d60> Section com.alipay.iphoneclient 'Alipay': shows in NC = NO, Alert style = Banner, Lockscreen = YES, External = YES, Push settings = [s:BSA] [e:BSA], allows notifications = YES"
cy# [controller _valueOfNotificationType:0x10 forSectionInfo:sectionInfo]
@true
Everything is all the same except that the return value is 1. Why?