ios - Why does NSLog not output aString parameter? -


i have following code in tweak.xm:

%hook nsstring - (bool)isequaltostring:(nsstring *) astring {     nslog(@"%@", [nsstring stringwithformat:@"isequaltostring : %@ with: %@", astring, self]);      return %orig; } %end 

however syslog output shows self not astring (should after :), example:

apr 9 20:46:32 remini citrixreceiver-ipad[7972] <warning>: isequaltostring : with: /var/mobile/containers/data/application/42123bed-a507-4ce0-97b0-20dffd9bb78c apr 9 20:46:32 remini citrixreceiver-ipad[7972] <warning>: isequaltostring : with: /applications/cydia.app apr 9 20:46:32 remini citrixreceiver-ipad[7972] <warning>: isequaltostring : with: /private/var/lib/apt/ apr 9 20:46:32 remini citrixreceiver-ipad[7972] <warning>: isequaltostring : with: /var/mobile/containers/data/application/42123bed-a507-4ce0-97b0-20dffd9bb78c

why astring not outputted?

i hazard guess string either nil or empty. check against @ beginning of method. i.e.

if (astring == nil || [astring length] == 0)  {     ... }  

Popular posts from this blog