Ios 架构armv7的未定义符号错误

Ios 架构armv7的未定义符号错误,ios,makefile,Ios,Makefile,我在github上找到了Unlock7示例项目,现在我试图在显示音乐控制器时将模糊(stackblur)添加到背景中,但在编译它时出现了以下错误: AXel-4:/var/mobile/unlock7 root# make package install /var/mobile/unlock7/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with ip

我在github上找到了Unlock7示例项目,现在我试图在显示音乐控制器时将模糊(stackblur)添加到背景中,但在编译它时出现了以下错误:

AXel-4:/var/mobile/unlock7 root# make package install
/var/mobile/unlock7/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/unlock7/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
/var/mobile/unlock7/theos/makefiles/master/bundle.mk:17: warning: overriding commands for target `Unlock7'
/var/mobile/unlock7/theos/makefiles/master/tweak.mk:20: warning: ignoring old commands for target `Unlock7'
Making all for tweak Unlock7...
make[2]: Nothing to be done for `internal-library-compile'.
Making all for bundle Unlock7...
 Copying resource directories into the bundle wrapper...
 Linking bundle Unlock7...
Undefined symbols for architecture armv7:
  "_MSHookMessageEx", referenced from:
      _logosLocalInit() in Tweak.xm.a06cfd38.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [obj/Unlock7.bundle/Unlock7.64873355.unsigned] Error 1
make[1]: *** [internal-bundle-all_] Error 2
make: *** [Unlock7.all.bundle.variables] Error 2
这是生成文件:

export GO_EASY_ON_ME = 1
include theos/makefiles/common.mk

TWEAK_NAME = Unlock7
BUNDLE_NAME = Unlock7
com.bushe.unlock7_INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries
Unlock7_FILES = Tweak.xm UIImage+StackBlur.m
Unlock7_FRAMEWORKS = UIKit CoreGraphics

include $(THEOS_MAKE_PATH)/tweak.mk
include $(THEOS)/makefiles/bundle.mk

after-install::
    install.exec "killall -9 SpringBoard"
代码如下:

#import <UIKit/UIKit.h>
#import <UIImage+StackBlur.h>
#import <logos/logos.h>

#define kBundlePath @"/Library/MobileSubstrate/DynamicLibraries/Unlock7.bundle"

@interface NowPlayingArtPluginController : NSObject
- (id)view;
@end

@interface SBAwayView : UIView
-(id)topBar;
-(id)bottomBar;
-(id)_defaultDesktopImage;
@end

@interface SBAwayDateView : UIView
-(void)setPositon;
@end

@interface SBDeviceLockViewWithKeypad : UIView
@end

@interface SBAwayController : NSObject
-(id)sharedAwayController;
@end



@interface TPLCDTextView : UIView {}
-(void)setShadowColor:(UIColor *)fp8;
-(void)setText:(id)fp8;
-(void)setTextColor:(UIColor *)fp8; 
-(void)setFont:(UIFont*)font;
- (void)setLCDTextFont:(id)arg1;
@end

CGPoint _priorPoint;

%hook SBAwayView
-(void)finishedAnimatingIn{
    %orig;
    UIView *&_backgroundView(MSHookIvar<UIView *>(self, "_backgroundView"));
    [_backgroundView setUserInteractionEnabled:YES]; //Allows backbround to use gesture

    [[self dateHeaderView] setPositon]; //reset the position of the date view to be below the larger clock

    UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(newUnlockStyleMover:)];
    [panRecognizer setMinimumNumberOfTouches:1];
    [panRecognizer setMaximumNumberOfTouches:1];
    //[_backgroundView addGestureRecognizer:panRecognizer] This can be used but is incompatible with LockHTML 
    [[self.subviews objectAtIndex:0] addGestureRecognizer:panRecognizer]; //Add gesture to the background view or LockHTML's z order organizer
    [panRecognizer release];

    panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(newUnlockStyleMover:)];
    [panRecognizer setMinimumNumberOfTouches:1];
    [panRecognizer setMaximumNumberOfTouches:1];
    [[self bottomBar] addGestureRecognizer:panRecognizer]; //Lockbar
    [panRecognizer release];

    panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(newUnlockStyleMover:)];
    [panRecognizer setMinimumNumberOfTouches:1];
    [panRecognizer setMaximumNumberOfTouches:1];
    [[self topBar] addGestureRecognizer:panRecognizer]; //Clock and Date View's
    [panRecognizer release];

    [self _setTopBarImage:[self getUIImageForControls] shadowColor:[UIColor clearColor]];

    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
    [[NSNotificationCenter defaultCenter]
       addObserver:self selector:@selector(orientationChanged:)
       name:UIDeviceOrientationDidChangeNotification
       object:[UIDevice currentDevice]];
}

%new
- (void) orientationChanged:(NSNotification *)note
{
   [[self dateHeaderView] setPositon];
}

%new
- (void)newUnlockStyleMover:(UIPanGestureRecognizer *)sender {
        UIView *&_lockBar(MSHookIvar<UIView *>(self, "_lockBar"));
        float width = ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown) ? [[UIScreen mainScreen] bounds].size.width : [[UIScreen mainScreen] bounds].size.height;
        CGPoint point = [sender locationInView:sender.view.superview];
        if (sender.state == UIGestureRecognizerStateChanged){
            UIImage *_defaultDesktopImage = [self _defaultDesktopImage];
            for(UIView *obj in [self subviews]){    
                if(obj != [self.subviews objectAtIndex:0]){
                    CGPoint center = obj.center;
                    if(center.x < width/2)
                        center.x += (point.x - _priorPoint.x)/3;
                    else
                        center.x += point.x - _priorPoint.x;

                    obj.center = center;
                }
            }
        }
        else if (sender.state == UIGestureRecognizerStateEnded){
            if(_lockBar.center.x < width){

                for(UIView *obj in [self subviews]){    
                    if(obj != [self.subviews objectAtIndex:0]){
                        CGPoint center = obj.center;
                        center.x = width/2;
                        [UIView animateWithDuration:0.6
                             animations:^{ 
                                obj.center = center;
                             } 
                             completion:^(BOOL finished){
                             }];
                    }
                }
            }
            else{
                for(UIView *obj in [self subviews]){    
                    if(obj != [self.subviews objectAtIndex:0]){
                        CGPoint center = obj.center;
                        center.x = width+(width/2);
                        [UIView animateWithDuration:0.2
                             animations:^{ 
                                obj.center = center;
                             } 
                             completion:^(BOOL finished){
                             }];
                    }
                }
                if([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"/Library/MobileSubstrate/DynamicLibraries/AndroidLock.dylib"]] == TRUE && [[[NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.zmaster.AndroidLock.plist"] objectForKey:@"Enable"] boolValue] == TRUE){
                    [[%c(SBAwayController) sharedAwayController] unlockWithSound:TRUE bypassPinLock:[[%c(SBDeviceLockController) sharedController] isPasswordProtected]];
                    CGPoint center = _lockBar.center;
                    center.x = width/2;
                    _lockBar.center = center;
                }
                else{
                    //[[%c(SBAwayController) sharedAwayController] _sendToDeviceLockOwnerSetShowingDeviceLock:TRUE animated:FALSE];
                    [[[[%c(SBAwayController) sharedAwayController] awayView] bottomBar] setHidden:YES];

                    [[[[%c(SBAwayController) sharedAwayController] awayView] bottomBar] unlock];
                }
            }
        }
        _priorPoint = point; 

}

-(id)_topBarLCDImage{
    return [self _topBarLCDControlsImage];
}

- (id)_topBarLCDControlsImage{
    return [self getUIImageForControls];
}

%new
-(UIImage*)getUIImageForControls{
    UIGraphicsBeginImageContextWithOptions(CGSizeMake([[UIScreen mainScreen] bounds].size.width, 133), NO, 0.0);
    NSBundle *bundle = [[[NSBundle alloc] initWithPath:kBundlePath] autorelease];
    NSString *imagePath = [bundle pathForResource:@"blurbackground" ofType:@"png"];
    UIImage *blank = UIGraphicsGetImageFromCurrentImageContext();
    UIImage *myImage = [UIImage imageWithContentsOfFile:imagePath];
    UIImage *myIma=[[UIImage imageNamed:@"blurbackground.png"] normalized];
    UIImage *blurIma=[myIma stackBlur:29.8];
    UIGraphicsEndImageContext();
    return blank;
}

- (void)_setPluginController:(id)arg1{ 
    %orig(arg1);
    if ([arg1 isMemberOfClass:NSClassFromString(@"NowPlayingArtPluginController")]){
        id pluginController = [self currentAwayPluginController];
        if ([pluginController isMemberOfClass:NSClassFromString(@"NowPlayingArtPluginController")]){
        UIView *pluginView = [(NowPlayingArtPluginController *)pluginController view];
                UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(newUnlockStyleMover:)];
                [panRecognizer setMinimumNumberOfTouches:1];
                [panRecognizer setMaximumNumberOfTouches:1];
                //[panRecognizer setDelegate:self];
                [pluginView addGestureRecognizer:panRecognizer];
                [panRecognizer release];
            for(UIView *obj in [[(NowPlayingArtPluginController *)pluginController view] subviews]){        
                    if([obj isKindOfClass:[UIImageView class]]){
                        if([[UIScreen mainScreen] bounds].size.width == 320)
                            obj.frame = CGRectMake(0, 0, 256, 256);
                    }
                    if([obj isKindOfClass:NSClassFromString(@"NowPlayingReflectionView")]){
                        [obj removeFromSuperview];
                    }
            }
            if([[UIScreen mainScreen] bounds].size.width == 320)
                pluginView.frame = CGRectMake(32,160,256,256);
        }
    }
}

%end

%hook SBAwayController
- (void)undimScreen:(BOOL)arg1{
    //Slide Lockscreen back to default position after the screen sleeps
    float width = ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown) ? [[UIScreen mainScreen] bounds].size.width : [[UIScreen mainScreen] bounds].size.height;
    [[[[%c(SBAwayController) sharedAwayController] awayView] bottomBar] setHidden:NO];
    for(UIView *obj in [[self awayView] subviews]){ 
        if(obj != [[[self awayView] subviews] objectAtIndex:0]){
            CGPoint center = obj.center;
            center.x = width/2;      
            [UIView animateWithDuration:0.6
                 animations:^{ 
                    obj.center = center;
                 } 
                 completion:^(BOOL finished){
                 }];
        }
    }
    %orig;
}
%end

%hook SBAwayDateView
-(void)setFrame:(CGRect)frame{
    %orig;

    TPLCDTextView *timeLabel = MSHookIvar<TPLCDTextView *>(self, "_timeLabel");
    [timeLabel setLCDTextFont:[[timeLabel font] fontWithSize:96]];
    [timeLabel setFrame:CGRectMake(timeLabel.frame.origin.x,timeLabel.frame.origin.y,timeLabel.frame.size.width,timeLabel.frame.size.height+60)];

    [self setPositon];  
}

%new
-(void)setPositon{
    TPLCDTextView *dateLabel = MSHookIvar<TPLCDTextView *>(self, "_dateAndTetheringLabel");
    [dateLabel setFrame:CGRectMake(dateLabel.frame.origin.x,100,dateLabel.frame.size.width,dateLabel.frame.size.height)];
}

- (void)setVisible:(BOOL)arg1{
    %orig;
    [self setPositon]; //attempt to keep date view in proper location
}

- (void)resizeAndPositionNowPlayingLabels{
    UILabel *_nowPlayingTitleLabel = MSHookIvar<UILabel *>(self, "_nowPlayingTitleLabel");
    UILabel *_nowPlayingArtistLabel = MSHookIvar<UILabel *>(self, "_nowPlayingArtistLabel");
    UILabel *_nowPlayingAlbumLabel = MSHookIvar<UILabel *>(self, "_nowPlayingAlbumLabel");
    [_nowPlayingTitleLabel setFrame:CGRectMake(0,95,[[UIScreen mainScreen] bounds].size.width,20)];
    [_nowPlayingArtistLabel setFrame:CGRectMake(0,109,[[UIScreen mainScreen] bounds].size.width,20)];
    [_nowPlayingAlbumLabel setFrame:CGRectMake(0,122,[[UIScreen mainScreen] bounds].size.width,20)];
}
%end

%hook TPLCDTextView
%new
-(UIFont *)font{
    UIFont *font = MSHookIvar<UIFont *>(self, "_font");
    return font;
}
%end

%hook SBAwayLockBar
-(id)wellImageName{
    return nil;
}

- (BOOL)usesBackgroundImage {
    return NO;
 }

- (id)initWithFrame:(struct CGRect)frame knobColor:(int)color{
    UIView *lockBar = %orig;    
    UIImageView *&_shadowView(MSHookIvar<UIImageView *>(self, "_shadowView"));
    [_shadowView removeFromSuperview];
    return lockBar;
}

- (id)initWithFrame:(struct CGRect)frame knobImage:(id)image{
    UIGraphicsBeginImageContextWithOptions(CGSizeMake(60, 47), NO, 0.0);
    UIImage *blank = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    UIView *lockBar = %orig(frame,blank); 
    UIImageView *&_shadowView(MSHookIvar<UIImageView *>(self, "_shadowView"));
    [_shadowView removeFromSuperview];
    return lockBar;
}
 %end

%hook SBDeviceLockView
- (void)notifyDelegateThatCancelButtonWasPressed{
    //Slide lockscreen back to default position after cancel button is pressed in lockscreen
    float width = ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown) ? [[UIScreen mainScreen] bounds].size.width : [[UIScreen mainScreen] bounds].size.height;
    for(UIView *obj in [[[%c(SBAwayController) sharedAwayController] awayView] subviews]){  
        if(obj != [[[[%c(SBAwayController) sharedAwayController] awayView] subviews] objectAtIndex:0]){
            CGPoint center = obj.center;
            center.x = width/2;          
            [UIView animateWithDuration:0.6
                 animations:^{ 
                    obj.center = center;
                 } 
                 completion:^(BOOL finished){
                 }];
        }
        [[[[%c(SBAwayController) sharedAwayController] awayView] bottomBar] setHidden:NO];
    }
    %orig;  
}
%end

%hook SBAwayMediaControlsView 
- (void)layoutSubviews{
    %orig;
    for(UIView *obj in [self subviews]){
        if ([obj isMemberOfClass:NSClassFromString(@"UIView")]){ //This is the MediaContols Thin Line
            [obj removeFromSuperview];
        }
    }
}
%end

%hook TPLCDBar
//Everything here make sure there is no thin black/grey line below the view
- (id)initWithDefaultSize{
    id topBar = %orig;
    UIImageView *&_shadowView(MSHookIvar<UIImageView *>(self, "_shadowView"));
    [_shadowView removeFromSuperview];
    return topBar;
}

- (id)initWithDefaultSizeForOrientation:(int)arg1{
    id topBar = %orig;
    UIImageView *&_shadowView(MSHookIvar<UIImageView *>(self, "_shadowView"));
    [_shadowView removeFromSuperview];
    return topBar;
}

-(id)initWithFrame:(CGRect)frame{
    id topBar = %orig;
    UIImageView *&_shadowView(MSHookIvar<UIImageView *>(self, "_shadowView"));
    [_shadowView removeFromSuperview];
    return topBar;
}

%end
#导入
#进口
#进口
#定义kBundlePath@“/Library/MobileSubstrate/DynamicLibraries/Unlock7.bundle”
@正在播放的接口插件InControl控制器:NSObject
-(id)视图;
@结束
@界面SBAwayView:UIView
-(id)顶杆;
-(id)底杆;
-(id)_defaultDesktopImage;
@结束
@界面SBAwayDateView:UIView
-(无效)坐位;
@结束
@界面SBDeviceLockView与键盘:UIView
@结束
@接口SBAwayController:NSObject
-(id)SharedWayController;
@结束
@接口TPLCDTextView:UIView{}
-(无效)设置阴影颜色:(UIColor*)fp8;
-(无效)setText:(id)fp8;
-(无效)setTextColor:(UIColor*)fp8;
-(void)setFont:(UIFont*)字体;
-(void)setLCDTextFont:(id)arg1;
@结束
CGPoint _priorPoint;
%胡克·斯巴威视图
-(无效)完成日期{
%奥利格;
UIView*&_backgroundView(MSHookIvar(自我,“_backgroundView”);
[\u backgroundView setUserInteractionEnabled:YES];//允许Backbound使用手势
[[self dateHeaderView]setPositon];//将日期视图的位置重置为低于较大时钟的位置
UIPanGestureRecognizer*panRecognizer=[[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(newUnlockStyleMover:)];
[装甲识别器设置最小接触次数:1];
[装甲识别器设置最大接触次数:1];
//[\u backgroundView AddGestureRecognitizer:PanRecognitizer]这可以使用,但与LockHTML不兼容
[[self.subviews objectAtIndex:0]addgestureerecognizer:panRecognizer];//将手势添加到背景视图或LockHTML的z顺序管理器
[装甲识别器释放];
PanRecognitzer=[[UIPangestureRecognitzer alloc]initWithTarget:self action:@selector(newUnlockStyleMover:)];
[装甲识别器设置最小接触次数:1];
[装甲识别器设置最大接触次数:1];
[[self-bottomBar]AddGestureRecognitizer:PanRecognitizer];//锁定栏
[装甲识别器释放];
PanRecognitzer=[[UIPangestureRecognitzer alloc]initWithTarget:self action:@selector(newUnlockStyleMover:)];
[装甲识别器设置最小接触次数:1];
[装甲识别器设置最大接触次数:1];
[[self topBar]AddGestureRecognitizer:PanRecognitizer];//时钟和日期视图的
[装甲识别器释放];
[self\u setTopBarImage:[self getUIImageForControls]阴影颜色:[UIColor clearColor]];
[[UIDevice currentDevice]BegingeratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter]
addObserver:自选择器:@selector(方向更改:)
名称:UIDeviceOrientationIDChangeNotification
对象:[UIDevice currentDevice]];
}
%新的
-(无效)方向更改:(NSNotification*)注
{
[[self-dateHeaderView]设置位置];
}
%新的
-(void)newUnlockStyleMover:(UIPangestureRecognitor*)发送方{
UIView*&_锁杆(MSHookIvar(自选,_锁杆));
浮动宽度=([UIApplication sharedApplication].StatusBaroOrientation==UIInterfaceOrientationRotation | |[UIApplication sharedApplication].StatusBaroOrientation==UIInterfaceOrientationRotationRotation UpsideDown)?[[UIScreen mainScreen]bounds]。size.width:[[UIScreen mainScreen]bounds]。size.height;
CGPoint point=[sender locationInView:sender.view.superview];
if(sender.state==UIGestureRecognitzerStateChanged){
UIImage*_defaultDesktopImage=[self\u defaultDesktopImage];
对于(UIView*obj in[self子视图]{
if(obj!=[self.subviews objectAtIndex:0]){
CGPoint center=obj.center;
如果(中心x<宽度/2)
中心x+=(点x-_priorPoint.x)/3;
其他的
中心x+=点x-_优先点x;
obj.center=中心;
}
}
}
else if(sender.state==UIgestureRecognitizerStateEnded){
如果(_锁杆.中心.x<宽度){
对于(UIView*obj in[self子视图]{
if(obj!=[self.subviews objectAtIndex:0]){
CGPoint center=obj.center;
中心x=宽度/2;
[UIView animateWithDuration:0.6
动画:^{
obj.center=中心;
} 
完成:^(布尔完成){
}];
}
}
}
否则{
对于(UIView*obj in[self子视图]{
if(obj!=[self.subviews objectAtIndex:0]){
CGPoint center=obj.center;
中心x=宽度+(宽度/2);
[UIView animateWithDuration:0.2
动画:^{
obj.center=中心;
} 
完成:^(布尔完成){
}];
}
}
如果([[NSFileManager defaultManager]fileExistsAtPath:[NSString stringWithFormat:@”/Library/MobileSubstrate/DynamicLibraries/AndroidLock.dylib“]==TRUE&[[NSDictionary Dictionary Dictionary WithContentsOfFile:@”/var/mobile/Library/Preferences/com.zmaster.AndroidLock.plist”]objectForKey:@“启用”]boolValue]==TRUE){
[[%c(SBAwayController)sharedAwayController]用声音解除锁定:真旁路pinlock:[[%c(SBDeviceLockController)sharedController]受密码保护]];
CGPoint center=_lockBar.center;
中心x=宽度/2;
_锁杆。中心=中心;
}
否则{
//[[%c(SBAwayController)sharedAwayController]\u发送到DeviceLockownersetShowingDeviceLock:真实动画
export GO_EASY_ON_ME = 1
include theos/makefiles/common.mk

TWEAK_NAME = Unlock7
$(TWEAK_NAME)_INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries
$(TWEAK_NAME)_FILES = Tweak.xm UIImage+StackBlur.m
$(TWEAK_NAME)_FRAMEWORKS = UIKit CoreGraphics
include $(THEOS_MAKE_PATH)/tweak.mk

BUNDLE_NAME = Unlock7img
$(BUNDLE_NAME)_INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries
include $(THEOS)/makefiles/bundle.mk

after-install::
    install.exec "killall -9 SpringBoard"
#define kBundlePath @"/Library/MobileSubstrate/DynamicLibraries/Unlock7img.bundle"