문제 설명
구문 분석 문제: 'stringByAppendingFormat' 모듈을 찾을 수 없습니다. (Parse Issue: Module 'stringByAppendingFormat' not found)
Xcode 5로 iOS7 프로젝트 작성
다음과 같은 간단한 코드가 있습니다.
NSString* inflation=@"test'", *import=@"";
if ([inflation length]>0){
import=[import stringByAppendingFormat:@"\nExports %@",inflation];
}
그리고 컴파일을 시도할 때 이 오류가 계속 발생합니다: Module 'stringByAppendingFormat' not found
참조 솔루션
방법 1:
LLVM uses import
for importing modules (currently an experimental feature but seems to be enabled by default in Xcode). Have a look at the docs.
To resolve your issue, just rename the variable, or compile with "‑fno‑modules".
방법 2:
There is not an issue with this code, so don't blame ios7 :P
Just change your variable name.
NSString* inflation=@"test'", *importString=@"";
if ([inflation length]>0){
importString=[importString stringByAppendingFormat:@"\nExports %@",inflation];
}
(by user422337、Sebastian、Rajneesh071)