MPPlayableContentDataSource不调用contentItemForIdentifier:completionHandler:

Mis*_*rko 9 ios carplay

我正在使用CarPlay(模拟器10.3.1)并在MPPlayableContentDataSource中实现所有方法,但不调用下面的方法.

- (void)contentItemForIdentifier:(NSString *)identifier completionHandler:(void(^)(MPContentItem *__nullable, NSError * __nullable))completionHandler 
Run Code Online (Sandbox Code Playgroud)

有人知道任何理由吗?

Dip*_*cha 0

您是否设置了 MPPlayableContentDataSource 的委托和数据源。因为如果不设置这两个属性,所有与 dataSource 和 delegate 相关的方法都不会执行。