ios - 'YVideoView' 不可用:在 iOS(应用扩展)上不可用 - 渲染在应用扩展中不可用
问题描述
我有一个导入XYVideoPlayer.framework
. 在 XYVideoPlayer.framework 项目中,
代码片段VideoViewController.h
就像
#import <UIKit/UIKit.h>
#pragma once
@interface VideoViewController : UIViewController {
@public
#if ! TARGET_IPHONE_SIMULATOR
IBOutlet XVideoView *video_view;
#else
IBOutlet YVideoView *video_view;
#endif
IBOutlet UIView *video_container_view;
}
&中的代码片段YVideoView.h
就像
#import <UIKit/UIKit.h>
#import "VideoRenderer.h"
NS_ASSUME_NONNULL_BEGIN
@class YVideoView;
RTC_OBJC_EXPORT
NS_EXTENSION_UNAVAILABLE_IOS("Rendering not available in app extensions.")
@interface YVideoView : UIView <VideoRenderer>
@end
NS_ASSUME_NONNULL_END
现在的问题是,当我import XYVideoPlayer
在我的主项目中尝试构建时。iPhone 中没有构建错误,但在模拟器中,构建因错误
“YVideoView”而失败不可用:在 iOS (App Extension) 上不可用 - 渲染在应用扩展中不可用。知道如何修复 xcode 模拟器的构建错误吗?
解决方案
推荐阅读
- android - Android TransactionTooLargeException 不知道是什么原因造成的
- sql-server - 可以在多多边形中获得单个多边形吗?
- html - 博客菜单未显示在移动屏幕上
- vuejs2 - Vuetify 下拉列表无法正常工作
- ruby-on-rails - 在 Rails 上使用 ImageMagick 绘制不使用 PNG
- python - 从数组(频谱...)生成音频文件
- jquery - 使用 Apache 2.4.6 加载 magnific popup 时出现“无法加载内容” - 但不是 Apache 2.2.15
- c# - 在 lambda 表达式中使用局部属性的方法
- sql - 如何重命名系统生成的约束名称和主键索引
- c# - 为什么我从 Clipboard 类中得到 OutOfMemoryException?