I'm tryng to extend my application supporting touchbar but touch bar delegate method is never called. :
- (nullable NSTouchBarItem *)touchBar:(NSTouchBar *)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
This is the code of my view controller
static NSTouchBarCustomizationIdentifier SliderCustomizationIdentifier = @"com.myapp.sliderViewController";
static NSTouchBarItemIdentifier SliderItemIdentifier = @"com.myapp.slider";
@interface SliderViewController () <NSTouchBarDelegate>
@end
@implementation SliderViewController
//init touch bar is called
- (NSTouchBar *)makeTouchBar
{
NSTouchBar *bar = [[NSTouchBar alloc] init];
bar.delegate = self;
bar.customizationIdentifier = SliderCustomizationIdentifier;
// Set the default ordering of items.
bar.defaultItemIdentifiers =
@[SliderItemIdentifier, NSTouchBarItemIdentifierOtherItemsProxy];
bar.customizationAllowedItemIdentifiers = @[SliderItemIdentifier];
return bar;
}
//NEVER CALLED
- (nullable NSTouchBarItem *)touchBar:(NSTouchBar *)touchBar makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier
{
}
@end