我遇到了与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/

10-10 20:24