build failed with ios app
I use the command infer --incremental -- xcodebuild -workspace QQNews.xcworkspace -scheme QQNews -configuration Debug -sdk iphonesimulator CLANG_ENABLE_MODULES=NO build failed: /Users/selmazhang/workspace/news_ios_codeCheck/QNCore/QNCore/QNCrashGuard/QNCrashGuard.m:15:1: error: use of '@import' when modules are disabled @import UIKit; ^ /Users/selmazhang/workspace/news_ios_codeCheck/QNCore/QNCore/QNCrashGuard/QNCrashGuard.m:64:55: error: use of undeclared identifier 'UIApplicationWillTerminateNotification' name:UIApplicationWillTerminateNotification ^ /Users/selmazhang/workspace/news_ios_codeCheck/QNCore/QNCore/QNCrashGuard/QNCrashGuard.m:73:68: error: use of undeclared identifier 'UIApplicationWillTerminateNotification' [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillTerminateNotification object:nil]; ^ 3 errors generated.
I use infer --version got the version of infer is 0.8.0
if I use the command
infer --incremental -- xcodebuild -workspace QQNews.xcworkspace -scheme QQNews -configuration Debug -sdk iphonesimulator CLANG_ENABLE_MODULES=YES
build failed message like that:
While building module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
/SDKs/iPhoneSimulator9.1.sdk/usr/include/CommonCrypto/CommonCryptoError.h:35:
While building module 'std' imported from /Users/selmazhang/Downloads/infer-osx-v0.8.0/facebook-clang-plugins/clang/bin/../include/c
++/v1/math.h:309:
In file included from
2 errors generated.
You can try to selectively disable modules for your projects: https://github.com/facebook/infer/issues/232#issuecomment-173378896
we're tracking this error in #335