0

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

Matt Oz
  • 31
  • 1
  • 4
  • Did you add QuartzCore.framework to your project ? – Emmanuel Feb 13 '14 at 17:01
  • Yes I did. Do you think it is a conflict with AppKit ? – Matt Oz Feb 13 '14 at 18:15
  • What is the `OS X Deployment target` of the target ? OS X 10.7 at least ? – Emmanuel Feb 13 '14 at 18:54
  • Yes, Minimal OS X Deployement target 10.7 with SDK 10.9. – Matt Oz Feb 13 '14 at 19:04
  • I read in 10.8 AppKit Release Notes this : "Prior to 10.8, an AppKit managed layer would be destroyed (and removed) when a view was removed from a window or moved to another parent view. This would have the undesired effect of losing any custom properties set on the layer. For any view that explicitly has setWantsLayer:YES, the underlying AppKit managed layer will not be destroyed, and custom set layer properties will not get lost.". But I can't understand what I have to change in my code. Yes I customized some classes to get round corners in some nsview, nsbutton, etc. Not possible in 10.7 ? – Matt Oz Feb 13 '14 at 23:29

1 Answers1

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!

Matt Oz
  • 31
  • 1
  • 4