2
我得到此错误: 架构'x86_64'和变体'normal'的OS X部署目标'10 .9'大于OS X 10.8 SDK的最大值'10.8'。依赖关系分析警告 - XCODE 5
这里是我的代码:
//
// 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。看起来你的代码不是问题。 – Zarathuztra