环境 IOS15.4.1 Dopamine
Xcode 13.4.1
以下代码编译完打包deb后跑在在12 mini的机器上,在mac的控制台上查找不到 log输 Filter: com.apple.camera 也没有错 hook的class代码也无效 出请大神们帮忙看看指点下
Tweak.xm
#import <CameraUI/CAMZoomControl.h>
#import <CameraUI/CAMFullscreenViewfinder.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
%hook CAMZoomControl
-(void)viewDidAppear
{
%orig;
[self _setZoomFactor:0.5 interactionType:0 shouldNotifyDelegate:true];
NSLog(@"hook start");
}
%end
%hook CAMFullscreenViewfinder
-(id)initWithFrame:(CGRect)frame
{
id i=%orig(frame);
self.hidden=true;
NSLog(@"hook start");
return i;
}
- (void)didMoveToSuperview
{
%orig;
self.hidden=true;
NSLog(@"hook start");
}
- (void)didMoveToWindow
{
%orig;
self.hidden=true;
NSLog(@"hook start");
}
%end
%ctor
{
NSLog(@"hook start");
}