Search code examples
objective-cswiftyoutube-apibridging-headerobjc-bridging-header

YTPlayerView not found issue


Currently i have kinda strange issue with YTPLayerView. I already have a project that contains both Objective-C and Swift codes. So, I need to use Youtube Player in Objective-c. The problem is that when i declare my Objective-c View Controller in Bridging-Header my Objective-C header file fives an error "'YTPlayerView.h' file not found", but this error do not occurs when my Bridging header is empty. Maybe i forgot something to include idk. Can someone help me? This is my Bridging Header code:

#import "CameraViewController.h";

This is my CameraViewController.h file:

@import UIKit;
#import "YTPlayerView.h"

@interface CameraViewController : UIViewController<YTPlayerViewDelegate>

@property(nonatomic, strong) IBOutlet YTPlayerView *playerView;

@end

I have already installed the podfile for youtube player:

use_frameworks!

target 'MyApp' do
pod 'youtube-ios-player-helper', '~> 0.1.4'

end

Thank you in advance!


Solution

  • Try to do:

    #import <youtube_ios_player_helper/YTPlayerView.h>