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];
但它仍然顯示相同的錯誤,請有一些請幫助我,這在這裏長時間卡在這裏。
感謝