2017-10-19 68 views
0

我有一个iOS项目,我想运行强化。使用xcodebuild构建它可以很好地运行多年。使用sourceanalyzer xcodebuild构建它失败。使用xcodebuild(Objective-C)强化未知属性属性'class'的原因是什么?

命令来构建的实际工作:失败

sourceanalyzer -b MobuyleUniversaliOS -debug-verbose -logfile fortify-build.log xcodebuild 

这种情况与各种不同的人NS引用的*类,直到最后sourceanalyzer

xcodebuild 

命令放弃并移动到下一个文件,它有同样的问题。下面是错误输出的一个样本:

In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:43:12: error: unknown property attribute 'class' 
@property (class, readonly) BOOL supportsSecureCoding; 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:38: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSItemProvider.h:36:12: error: unknown property attribute 'class' 
@property (class, NS_NONATOMIC_IOSONLY, readonly, copy) NSArray<NSString *> *writableTypeIdentifiersForItemProvider; 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSItemProvider.h:41:71: error: property has a previous declaration 
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray<NSString *> *writableTypeIdentifiersForItemProvider; 
                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSItemProvider.h:36:78: note: property declared here 
@property (class, NS_NONATOMIC_IOSONLY, readonly, copy) NSArray<NSString *> *writableTypeIdentifiersForItemProvider; 
                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSItemProvider.h:60:12: error: unknown property attribute 'class' 
@property (class, NS_NONATOMIC_IOSONLY, readonly, copy) NSArray<NSString *> *readableTypeIdentifiersForItemProvider; 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:6: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:290:12: error: unknown property attribute 'class' 
@property (class, readonly) const NSStringEncoding *availableStringEncodings; 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:296:12: error: unknown property attribute 'class' 
@property (class, readonly) NSStringEncoding defaultCStringEncoding; // Should be rarely used 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:11: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSNotification.h:44:12: error: unknown property attribute 'class' 
@property (class, readonly, strong) NSNotificationCenter *defaultCenter; 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:32:12: error: unknown property attribute 'class' 
@property (class, readonly, strong) NSBundle *mainBundle; 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:43:12: error: unknown property attribute 'class' 
@property (class, readonly, copy) NSArray<NSBundle *> *allBundles; 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:44:12: error: unknown property attribute 'class' 
@property (class, readonly, copy) NSArray<NSBundle *> *allFrameworks; 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:14: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:7: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSDate.h:45:12: error: unknown property attribute 'class' 
@property (class, readonly) NSTimeInterval timeIntervalSinceReferenceDate; 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSDate.h:57:12: error: unknown property attribute 'class' 
@property (class, readonly, copy) NSDate *distantFuture; 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSDate.h:58:12: error: unknown property attribute 'class' 
@property (class, readonly, copy) NSDate *distantPast; 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:14: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:100:12: error: unknown property attribute 'class' 
@property (class, readonly, copy) NSCalendar *currentCalendar;         // user's preferred calendar 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCalendar.h:101:12: error: unknown property attribute 'class' 
@property (class, readonly, strong) NSCalendar *autoupdatingCurrentCalendar API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // tracks changes to user's preferred calendar identifier 
     ^
In file included from <built-in>:359: 
In file included from <command line>:3: 
In file included from myproject/MobuyleUniversal-Prefix.pch:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:15: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:20:22: error: unknown property attribute 'class' 
@property (readonly, class, copy) NSCharacterSet *controlCharacterSet; 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:21:22: error: unknown property attribute 'class' 
@property (readonly, class, copy) NSCharacterSet *whitespaceCharacterSet; 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:22:22: error: unknown property attribute 'class' 
@property (readonly, class, copy) NSCharacterSet *whitespaceAndNewlineCharacterSet; 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:23:22: error: unknown property attribute 'class' 
@property (readonly, class, copy) NSCharacterSet *decimalDigitCharacterSet; 
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=] 
20 errors generated. 

回答

0

'类的属性添加到Objective-C的某个中间去年年末(2016)。

我的想法是强化/ sourceanalyzer(我已经不使用)要么不支持该语言的功能,或者它,你需要一个较新的版本。

+0

感谢。我必须通过IT和我们的安全部门才能获得新版本。如果/当它修复它,我会接受这个答案。 –

+0

@GingerMcMurray我看了片刻,看是否有文件,以什么语言版本/规格的Objective-C的强化使用,但我找不到它。我的直觉告诉我这种情况就是这样。祝你好运。 – greymouser