سؤال

Is it possible to write code that enable outputting "C" message to /var/log/syslog?

%hook classA
- (id)MethodB:(int)C
{
   //something
   return %orig;
}
هل كانت مفيدة؟

المحلول

You can do :

%hook classA
- (id)MethodB:(int)C
{
    NSLog(@"C value : %d", C);
    return %orig;
}
%end

or :

%hook classA
- (id)MethodB:(int)C
{
    %log;
    return %orig;
}
%end
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top