I have implemented MPPlayableContentDataSource protocol. It has a method
- (void)beginLoadingChildItemsAtIndexPath:(NSIndexPath *)indexPath completionHandler:(void(^)(NSError * __nullable))completionHandler;
head unit calls this method each time when some container was shown on screen or user was tapped on some container.
How can I recognize who initialize call of the method? (user by tap or head unit)
First off, why would the difference (if there was any) matter? If that delegate method is being called, then you need to load the child items – period. That said, the head unit never requests your items without a user interaction of some kind.
When the user taps on a container, the child items for that index path are requested. Depending on whether you have a synchronous or asynchronous interface, you can then implement the respective delegate methods.