不建议使用initWithReceiverApplicationID使用initWithDiscoveryCriteria警告Chromecast

时间:2019-01-22 07:27:44

标签: ios chromecast

GCKCastOptions* options =
            [[GCKCastOptions alloc] initWithReceiverApplicationID:kGoogleChromeCastApplicationID];

Google Chromecast的初始化行开始向我发出此警告:

'initWithReceiverApplicationID:' is deprecated: Use initWithDiscoveryCriteria:

有人使用新的发起方式吗?

谢谢。

1 个答案:

答案 0 :(得分:0)

这是我通过警告的方式:

GCKDiscoveryCriteria *criteria = [[GCKDiscoveryCriteria alloc] initWithApplicationID:kGoogleChromeCastApplicationID];
GCKCastOptions* options = [[GCKCastOptions alloc] initWithDiscoveryCriteria:criteria];

希望这会有所帮助!

最佳