【问题标题】:Dependency Analysis Warning - XCODE 5依赖分析警告 - XCODE 5
【发布时间】:2014-01-11 03:43:02
【问题描述】:

我收到此错误: 架构“x86_64”和变体“正常”的 OS X 部署目标“10.9”大于 OS X 10.8 SDK 的最大值“10.8”。

这是我的代码:

//
//  AppDelegate.m
//  IMG Viewer
//
//  Created by Jeremy Irvine on 11/01/2014.
//  Copyright (c) 2014 Jezza23 inc. All rights reserved.
//

#import "AppDelegate.h"

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{

}

- (IBAction)OpenImage:(id)sender {
    NSOpenPanel *ImageOpener = [NSOpenPanel openPanel];
    [ImageOpener runModal];
    NSURL *imagePath = [ImageOpener URL];
    NSImage *image = [[NSImage alloc] initWithContentsOfURL:imagePath];

    [_ImageWindow setImage:image];
}
@end

还有 AppDelegate.h:

//
//  AppDelegate.h
//  IMG Viewer
//
//  Created by Jeremy Irvine on 11/01/2014.
//  Copyright (c) 2014 Jezza23 inc. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface AppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSImageView *ImageWindow;
- (IBAction)OpenImage:(id)sender;

@end

【问题讨论】:

  • 检查该应用程序目标的构建设置,并确保您正在构建正确的操作系统版本并针对 x86 cpu 进行编译。看起来你的代码不是问题。

标签: xcode macos xcode5


【解决方案1】:

在您的 Xcode 项目中,显示您的目标的构建设置(通过单击项目导航器中的项目,然后选择目标并单击“构建设置”选项卡)。在构建设置搜索框中,键入“部署”。它应该显示部署设置,其中之一名为“OS X 部署目标”。如果您针对 OS X 10.8 SDK 构建,则应将其设置为“OS X 10.8”(或更低版本)。

【讨论】:

  • 你是圣人!谢谢。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-07-12
  • 2018-02-22
  • 2015-02-25
  • 2013-01-13
相关资源
最近更新 更多