2017-10-19 94 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