News for hackers. Stuff that matters.
Re:NSTouchBar API Reference by tomelders on Thursday October 27, 2016 @08:42PM (#12811833)
Is there any policy to prevent apps displaying ads in the touch bar?
Re:NSTouchBar API Reference by mrsteveman1 on Thursday October 27, 2016 @08:54PM (#12811917)
It's a very tiny space but I wouldn't be surprised to see someone try sticking ads there.

However, it sounds like in the absence of private framework usage, the only way for your app to show anything in the bar at all is for it to be in the foreground.

So it would seem like less of an issue than even showing ads on the main screen, where any app can technically create windows that float over all the others and can't be moved by the user.

Re:NSTouchBar API Reference by gcr on Thursday October 27, 2016 @08:47PM (#12811862)
Yes. From the API docs:

"""There is no need, and no API, for your app to know whether or not there is a Touch Bar available. Whether your app is running on a machine that supports the Touch Bar or not, your app’s onscreen user interface (UI) appears and behaves the same way.

The Touch Bar dims automatically and wakes when the user touches it. Do not show alerts in the Touch Bar, and do not use the Touch Bar for widgets."""

Re:NSTouchBar API Reference by dahdum on Thursday October 27, 2016 @08:56PM (#12811937)
Nothing stopping the developer from showing alerts or ads though right? Your app might not know if it's enabled, but then again can just run 100% of the time in case it is.
Re:NSTouchBar API Reference by ams6110 on Thursday October 27, 2016 @09:14PM (#12812108)
I guess Apple not approving your app for the app store mught be a stopper.
Re:NSTouchBar API Reference by statictype on Thursday October 27, 2016 @09:34PM (#12812250)
Does it only work with App Store Apps?
Re:NSTouchBar API Reference by Gaelan on Friday October 28, 2016 @12:09AM (#12813009)
Doubt it. Apple demoed it with Photoshop, and I doubt PS is going on the App Store any time soon.
Re:NSTouchBar API Reference by cyrus_ on Thursday October 27, 2016 @09:19PM (#12812155)
Unless the OS is rendering the bar off-screen even when there isn't a hardware bar, you could trivially determine whether there is a bar by having the code that controls the bar set a flag / send a message.
Re:NSTouchBar API Reference by colejohnson66 on Friday October 28, 2016 @02:32AM (#12813591)
I sounds to me that it works like an interface. You call function `doFoo()` and if there's a foobar, the OS does foo. If there isn't a foobar, the method does nothing (but both return STATUS_FOO_SUCCESS).

For the touch bar, you aren't doing the actual rendering; the OS is. Only the OS knows if there's a touch bar, so without a kext or something, it seems there's no way for you to know if the touch bar exists.

Re:NSTouchBar API Reference by dom0 on Friday October 28, 2016 @04:33AM (#12814045)
Rendering and uploading something (or sending some messages to the touch bar controller; or queuing messages to the touch bar) probably takes a tiny bit longer than

    if(!touchbar) return MAKE_SUCCESS_GREAT_AGAIN;
But then again maybe the user space component just doesn't have that conditional.
Re:NSTouchBar API Reference by ramenmeal on Thursday October 27, 2016 @08:50PM (#12811887)
This got me thinking, does Apple screen apps as vigorously in the macOS Appstore?
Re:NSTouchBar API Reference by charlesdm on Thursday October 27, 2016 @09:18PM (#12812142)
Similar review process
Re:NSTouchBar API Reference by imron on Thursday October 27, 2016 @11:39PM (#12812836)
But, you can also release your own apps from your website so unlike iOS it's trivial to release and distribute an app that avoids the app store.
Re:NSTouchBar API Reference by whywhywhywhy on Friday October 28, 2016 @07:34AM (#12814827)
Just means they can't use certain OS X tech like iCloud