我遇到了与帖子 YouTube-Player-iOS-Helper can't use YTPlayerView class 中相同的问题. 但是,在我遵循同一篇文章中的答案之后 https://stackoverflow.com/a/30719229在桥接头文件中导入“YTPlayerView.h”,Xcode 说找不到“YTPlayerView.h”文件。
我用来安装“YouTube-Player-iOS-Helper”的 Podfile:
project 'YTSwift.xcodeproj'
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'YTSwift' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YTSwift
pod "youtube-ios-player-helper"
end
target 'YTSwiftTests' do
inherit! :search_paths
# Pods for testing
end
target 'YTSwiftUITests' do
inherit! :search_paths
# Pods for testing
end
我的“Bridging-Header.h”:
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "YTPlayerView.h"
请指教如何解决这个问题,谢谢! 如果有任何文件内容需要您引用,请告诉我。 谢谢!
最佳答案
尝试作为模块导入#import <youtube_ios_player_helper/YTPlayerView.h>
关于ios - 在 Swift 中使用 YouTube-Player-iOS-Helper 时找不到 "YTPlayerView.h"文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37805293/