本文介绍了未找到符号_OBJC_IVAR _ $ _ NSView._layer(在AppKit中)仅在10.7上,在10.8和10.9上正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的mac可可应用程序工作正常10.8和10.9除了10.7(全新安装)与此错误在开始:符号未找到:_OBJC_IVAR _ $ _ NSView._layer

My mac cocoa app works fine on 10.8 and 10.9 except on 10.7 (fresh install) with this error at start : Symbol not found: _OBJC_IVAR_$_NSView._layer

Process:         xxx [875]
Path:            /Users/USER/Desktop/xxx.app/Contents/MacOS/xxx
Identifier:      com.xxx.xxx
Version:         1.0 (1)
Code Type:       X86-64 (Native)
Parent Process:  launchd [127]

Date/Time:       2014-02-13 17:44:24.208 +0100
OS Version:      Mac OS X 10.7.5 (11G63)
Report Version:  9

Crashed Thread:  0

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Symbol not found: _OBJC_IVAR_$_NSView._layer
  Referenced from: /Users/USER/Desktop/xxx.app/Contents/MacOS/xxx
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Users/USER/Desktop/xxx.app/Contents/MacOS/xxx

(xxx = appname)

(xxx = appname)

我在系统磁盘上检查过,AppKit框架在forlder / System / Library / Frameworks /AppKit.framework/Versions/C/AppKit

I checked on system disk, AppKit framework is fine in the forlder /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit

很奇怪,不是吗?
谢谢任何帮助...

Weird, isn't it ?Thank you for any help ...

推荐答案

我通过删除我的所有代码:

I fixed the issue by remove this lines in all of my code :

//self.layer = _layer; //Not necessary at all
self.wantsLayer = YES; //Necessary since 10.8

非常感谢您的帮助!

这篇关于未找到符号_OBJC_IVAR _ $ _ NSView._layer(在AppKit中)仅在10.7上,在10.8和10.9上正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 05:57