Symbol not found _OBJC_IVAR_$_NSView._layer (in AppKit) only on 10.7, works fine on 10.8 and 10.9

倾然丶 夕夏残阳落幕 提交于 2019-12-11 19:13:24

问题


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)

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 ...


回答1:


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

Thank you so much for help!



来源:https://stackoverflow.com/questions/21760465/symbol-not-found-objc-ivar-nsview-layer-in-appkit-only-on-10-7-works-fine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!