I've designed an app that includes support for the touch bar. The touch bar is created in Interface Builder. All code uses Swift's #available checks to make sure that no touch bar code gets executed on macOS prior to 10.12. The XIB (and app) is set to deploy to 10.10, but when I run my app I still get errors like:
-[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSTouchBar)
How can I make sure that decoding the XIB skips the touch bar on macOS prior to 10.12?