4

I'm referring to the code here: NSTouchBar Catalog

How do you test this on a Macbook / Mac without a Touch Bar? I'm hoping we can still simulate it somehow? I've tried running this catalog on my Mac and I see an empty list (i.e. nothing's being displayed in the app).

jscs
  • 63,694
  • 13
  • 151
  • 195
strangetimes
  • 4,953
  • 1
  • 34
  • 62

2 Answers2

2

There is a touch bar simulator. You need latest Xcode 8.1 and macOS 10.12.1.

You will see "Show Touch Bar" at Window menu of Xcode.

https://help.apple.com/xcode/mac/8.1/#/dev7a8cb8a8c

BTW, my mac did not have touch bar simulator in the menu even after updating to macOS 10.12.1. I have installed macOS 10.12.1 directly from https://support.apple.com/kb/dl1897?locale=en_US and touch bar showed up.

  • Thanks that was it. Turns out the macOS update from the app store was older than the one posted on the developer downloads section – strangetimes Oct 28 '16 at 18:03
  • Thanks this did it for me. Tutorial if you're interested https://www.youtube.com/watch?v=N_R84ylCBcs – ZappyCode Oct 28 '16 at 21:43
-1

What you need:

To develop apps that use the Touch Bar, your Mac will need to run Xcode 8.1 on macOS Sierra 10.12.1 (16B2657) or later.

16B2657

BTW, these two lines would make somebody disappointed:

1.There is no need, and no API, for your app to know whether or not there is a Touch Bar available. 2. The Touch Bar dims automatically and wakes when the user touches it.

Jiulong Zhao
  • 1,313
  • 1
  • 15
  • 25