unrecognized selector sent to instance

-- iOS (iPhone) 2012. 11. 23. 13:16
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
static library를 만들어 테스트 프로젝트에 해당 library를 사용할 때 특정 기능에 대해 아래와 같은 에러가 발생한다.

-[__NSCFString stringxxxxxxxxxxxxxx]: unrecognized selector sent to instance 0x7140040

일반 프로젝트에서는 제대로 수행되는 기능들이 library화 하여 테스트 프로젝트에 이 library를 참조하게 되면 가끔 위의 에러가 발생할 경우가 있는데 아래와 같이 linker option을 주면 해결된다.

[테스트 프로젝트]

Project Navigator창에 Project를 선택하고

TARGETS     
TestProject - Build Settings

Linking > Other Linker Flags > -ObjC

위처럼 Linker Option으로 -ObjC를 지정하면 해당 에러는 사라진다.

'-- iOS (iPhone)' 카테고리의 다른 글

Automatic Reference Counting과 -fno-objc-arc  (0) 2012.12.06
AppDelegate의 정의된 함수 설명  (0) 2012.12.06
XCode static library 생성  (0) 2012.11.22
UIAlertView Message Box  (0) 2012.11.13
아이폰 배포 SDK버전 설정  (0) 2012.10.22
posted by 어린왕자악꿍