Symbol not found: _OBJC_IVAR_$_NSScroller._action in High Sierra

Malcolm McCaffery picture Malcolm McCaffery · Feb 28, 2018 · Viewed 14.5k times · Source

An application which worked on previous versions of MacOS fails on High Sierra with the following message:

dyld: Symbol not found: _OBJC_IVAR_$_NSScroller._action Referenced from: Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit

What change might lead to this issue? (I am not expert in MacOS development) I suspect otool command might help identify changes related to this problem but haven't worked out the right parameters for it yet.

Checking AppKit documentation https://developer.apple.com/documentation/appkit/deprecated_symbols it says NSDrawer is deprecated, is this related?

NSDrawer [deprecated] A user interface element that contains and displays text, scroll, and browser views, in addition to other view subclasses.

Answer

cjn picture cjn · Apr 30, 2020

Same issue for Catalina upgrade.

Verified the old directory...

$ xcode-select -p

> /Applications/Xcode.app/Contents/Developer

But when running the switch directory command, it failed:

$ xcode-select -switch /Library/Developer/CommandLineTools

> xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools/'

Solution

Had to do the following:

  1. Install xcode-select (which will notify xcode cli dev tools needs to be downloaded & installed)

    $ xcode-select --install
    

    > xcode-select: note: install requested for command line developer tools

  2. Now, run the switch command & everything should be well again in the world.

    $ sudo xcode-select -switch /Library/Developer/CommandLineTools/
    
  3. Profit

Hope this helps.