swift - How to use YouTube iOS player helper with use_frameworks! with CocoaPods -
as question states, i'm trying use module in swift project using use_frameworks!
option on podfile
. so:
platform :ios, "8.0" source 'https://github.com/cocoapods/specs.git' use_frameworks! pod 'youtube-ios-player-helper', '~> 0.1.3' pod 'reactivecocoa', '3.0-beta.6' pod 'moya' pod 'moya/reactive'
i have checked pods project , has framework called youtube_ios_player_helper.framework
since -
invalid character name. when add import youtube_ios_player_helper
swift file error saying not exist.
i must have obj-c code in project , because of have bridging header file in project.
make sure you're adding library correct target.
my podfile:
platform :ios, '8.3' target 'myapp' use_frameworks! pod 'youtube-ios-player-helper' end
viewcontroller.swift:
import uikit import youtube_ios_player_helper class viewcontroller: uiviewcontroller { // ... override func viewdidload() { super.viewdidload() let myview = ytplayerview() // ... } // ... }
if pure swift import import youtube_ios_player_helper
doesn't work, adding #import "ytplayerview.h"
application's bridging header should have same effect of bridging youtube helper class swift.
Comments
Post a Comment