2014-11-08 22 views
0

嗨在我的應用程序我在我的應用程序中使用XCDYouTubeVideoPlayerViewController在它的IOS 7中工作正常播放YouTube視頻, IOS 8喜歡。終止應用程序由於未捕獲的異常'NSGenericException',原因:'使用`initWithVideoIdentifier:`方法代替

Terminating app due to uncaught exception 'NSGenericException', reason: 'Use the `initWithVideoIdentifier:` method instead 

然後...我已經尋找解決方案,然後我得到這個鏈接click here我沒有excalty像他們提到我已經安裝使用Cocoapods問題XCDYouTubeKit 2.0.2的最新優化版本和我已經進口的庫中.H文件。

#import <XCDYouTubeKit/XCDYouTubeKit.h> 

我已經做了這樣的代碼。

XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"]; 
    [self presentMoviePlayerViewControllerAnimated:videoPlayerViewController]; 
    [videoPlayerViewController.moviePlayer play]; 

但它仍然顯示相同的錯誤,請有一些請幫助我,這在這裏長時間卡在這裏。

感謝

回答

0

使100%確保您正在使用最新版本的XCDYouTubeKit的(2.0.3截至發稿時)。您描述的問題僅在版本1.x中存在。

相關問題