Xcode 9使用不同类型的Typedef重定义('NSString *'vs'AVMediaType')

时间:2017-09-21 07:42:53

标签: ios objective-c xcode

更新到Xcode 9.0 final之后,我无法构建我的Objective-C项目。它说:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVMediaFormat.h:14:20: Typedef redefinition with different types ('NSString *' vs 'AVMediaType')

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAssetWriter.h:135:41: Type argument 'AVMediaType' is neither an Objective-C object nor a block type

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:513:102: Nullability specifier 'nullable' cannot be applied to non-pointer type 'AVMediaType'

1 个答案:

答案 0 :(得分:0)

您需要在项目中查看使用AVMediaType的位置,例如使用ffmpeg库并重命名' AVMediaType'在ffmpeg中引用的其他地方,如avutil.h中的avformat.h avcodec.h等。