当我尝试导入<AppKit.framework/AppKit.h>时,Xcode会输出一个错误,即使该文件已经存在。
示例脚本:
#import <Foundation/Foundation.h>
#import <AppKit.framework/AppKit.h>
int main (int argc, const char * argv[])
{
@autoreleasepool {
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.google.com/"]];
}
return 0;
}发布于 2012-01-20 06:25:40
将该行更改为:
#import <AppKit/AppKit.h>还要确保将AppKit.framework添加到项目中包含的框架列表中。
https://stackoverflow.com/questions/8934087
复制相似问题