ios - Apple 的 PhotoKit 的 AVCompositionTrackSegment.h 的编译器错误

标签 ios objective-c xcode swift photokit

我的项目开始出现 PhotoKit header 之一(即 AVCompositionTrackSegment.h)错误。错误是预期标识符或“(”,并且它不指向文件中的任何行。当我导入PhotosMediaPlayer时会发生这种情况code> 框架到我的 Swift 文件。我正在使用 Xcode 7.3,但我不确定这是否在更新 Xcode 之前开始。我已经删除了派生数据目录并完成了干净的构建,但没有成功。知道为什么 Xcode 被破坏了这边走?

enter image description here

编辑

卸载应用程序后开始使用模拟器。但对于真实的设备没有帮助。

最佳答案

我找到了错误的原因。 AVCompositionTrackSegment.h 已损坏。由于某种原因,行 @property (nonatomic, readonly, getter=isEmpty) BOOL empty; 被替换为 &&

编辑

只工作过一次。现在,它在同一文件的空行中给出错误“未知类型名称''”。该文件没有错误,因为它是从其他开发人员的计算机上恢复的。

从头文件末尾删除了以下几行,现在可以编译了。所以看起来像是 Xcode 中的一个错误。向 Apple 提交了错误报告。

/* indicates whether the AVCompositionTrackSegment is an empty segment;
   an empty segment has a valid target time range but nil sourceURL and kCMTimeInvalid source start time; all other fields are undefined */
@property (nonatomic, readonly, getter=isEmpty) BOOL empty;
​
/* indicates the container file of the media presented by the AVCompositionTrackSegment */
@property (nonatomic, readonly, nullable) NSURL *sourceURL;
​
/* indicates the track of the container file of the media presented by the AVCompositionTrackSegment */
@property (nonatomic, readonly) CMPersistentTrackID sourceTrackID;

关于ios - Apple 的 PhotoKit 的 AVCompositionTrackSegment.h 的编译器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36269025/

相关文章:

ios - 访问包装在单独类中的静态方法中的 NSURLSessionTasks 的委托(delegate)

ios - LLVM Xcode 版本 4.6.1 (4H512) 的编译器错误

ios - 让 indexPath = NSIndexPath(forRow : 0, inSection: 0) 的替代方法

ios - Swift 从 URLSession 返回数据

ios - 解析不同对象的不同用户评分

ios - 点击时从 UILabel 获取文本

ios - 如何使用[NSObject实例RespondToSelector]

ios - 将手势识别器添加到特定的 UITabBarController tabBarItem

iphone - iPad : how to change background color for Ipad app?

ios - 以恒定速度将 imageView 从当前位置移动到点击位置