0

I created a Objective C framework which i want to use in Swift Project. I want to expose only one header file in the framework.Following is my header file

//
//  VideoPlayer.h
//  DRMFrameworkObjc
//
//  Created by Next on 01/08/17.
//  Copyright © 2017 Next. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Streaming.h"
#import "LicenseManager.h"
#import <widevine_cdm_sdk_insecure_dev_sim/DashToHlsApiAVFramework.h>
#import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h>

@interface VideoPlayer : NSObject<StreamingDelegate>

@property(nonatomic) Streaming* streaming;
@property(nonatomic) AVPlayer* player;
@property(nonatomic) AVURLAsset* asset;
@property(nonatomic) NSArray* assetKeysRequiredToPlay;
@property(nonatomic) AVPlayerItem* playerItem;

-(void)initWithURl:(NSURL*)url playerInstance:(AVPlayer*)player controllerInstance:(UIViewController*) controller;
-(void)setupStreaming:(NSURL*)url controllerInstance:(UIViewController*) controller;
-(void)streamingReady:(NSNotification*)notification;

@end

So i added this header in the Umbrella header as below:

//
//  DRMFrameworkObjc.h
//  DRMFrameworkObjc
//
//  Created by Next on 01/08/17.
//  Copyright © 2017 Next. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for DRMFrameworkObjc.
FOUNDATION_EXPORT double DRMFrameworkObjcVersionNumber;

//! Project version string for DRMFrameworkObjc.
FOUNDATION_EXPORT const unsigned char DRMFrameworkObjcVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <DRMFrameworkObjc/PublicHeader.h>


#import <DRMFrameworkObjc/VideoPlayer.h>

When i add this framework to Swift project I was getting "Could not build Objective C framework ..." and other error is "Streaming.h file not found..". I added the VideoPlayer.h file in bridging header. Why am i getting Streaming.h not found when i don't want it to expose? Is my method of creating Objective C framework wrong? Where am i wrong?

4

0 回答 0