ios - 在 Swift 中使用 YouTube-Player-iOS-Helper 时找不到 "YTPlayerView.h"文件

标签 ios objective-c swift youtube

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

相关文章:

ios - 如何在 JSON 中制作字典字典?

objective-c - 如何打印字体的字符集?

ios - 如何从 firebase 获取数据以供我的应用程序中的每个类使用 - swift ios 开发

ios - Swift - 单击按钮后立即显示带有加载指示器的警报的最佳方式?

ios - 如何在 XCode 6 中并排水平居中放置 2 个标签?

ios - 如何在 iTunes Connect 地区选择孟加拉国国家?

iphone - 如何为我的第一个 View 隐藏 UINavigationBar

objective-c - 非 root 用户可以终止使用 ServiceManagement Framework 启动的 OS X "login item"吗?

ios - 限制滑动角度以滚动 UIScrollView

swift - 从 NSView 显示弹出窗口