【发布时间】:2016-06-05 21:32:16
【问题描述】:
我正在尝试在此处安装 youtube ios 播放器助手 cocoapod:https://github.com/youtube/youtube-ios-player-helper
我已将该行添加到我的 pods 文件中:
platform :ios, '9.0'
use_frameworks!
target 'speedeo' do
pod "youtube-ios-player-helper"
end
我跑过pod install。我也遵循了这里的所有指示:http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/
所以我添加了一个名为 speedeo-Bridging-Header.h 的文件并在 Build Settings > Swift Compiler – Code Generation > Objective-C Bridging Header 部分中指向它。
在我的桥头文件中,我有:
#import "YTPlayerView.h"
并且它在该行上失败,说找不到该文件。我还尝试将 youtube_ios_player_helper.framework 框架添加到 Build Phases 部分的 Link Binary With Libraries 部分,但也无济于事。
有人能指出我正确的方向吗??
我环顾四周,它说 Podfile 中的 use_frameworks! 意味着我不需要使用桥接头。但是,当我尝试在 AppDelegate 中直接执行 import youtube_ios_player_helper 并构建时,它会失败。
【问题讨论】:
-
您是否清理过然后构建了您的项目。首次链接时经常发生。