카테고리(Category) 확장 메소드를 못찾는 경우
오픈 소스나 3rd party 프레임워크를 가지고 왔는데, 빌드시 오류도 없고 소스도 잘 가지고 있는 카테고리의 경우 실제 실행시 해당 확장한 카테고리의 메소드를 못 찾는 경우가 있다.
해결방법은,
TARGETS > 앱명 > Build Settings > Linking “Other Linker Flags” 에 “-ObjC” 추가해 준다.
(ex)
xxx.m에서 사용한 #import "NSMutableArray+aaa.h”의 객체 queue가 있는 경우, 얘의 메소드 enqueue를 못 찾고 죽는경우
<오류스타일>
2014-04-15 19:28:23.093 BookPlayer[3352:60b] -[__NSArrayM enqueue:]: unrecognized selector sent to instance 0x17d46270
2014-04-15 19:28:23.098 BookPlayer[3352:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM enqueue:]: unrecognized selector sent to instance 0x17d46270'
*** First throw call stack:
(0x2ead4fd3 0x39281ccf 0x2ead8967 0x2ead7253 0x2ea267f8 0x84831 0x80fb1 0x7eeb7 0x31326057 0x31325ff7 0x31325fd1 0x31311737 0x31325a4f 0x31325721 0x313206eb 0x312f58ed 0x312f3f97 0x2eaa025b 0x2ea9f72b 0x2ea9df1f 0x2ea08f4f 0x2ea08d33 0x3390d663 0x3135416d 0x740c5 0x3978eab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

[참고] http://stackoverflow.com/questions/10442653/unrecognized-selector-calling-category-method-in-static-ios-library
Your 3rd party framework is probable using a category on a existing (apple) class. But to load/find the category you need to add the -ObjC flag in the build settings under Other Linker Flags
[출처] http://funnyrella.blogspot.kr/2014/04/104.html
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
277 | Database | [mysql] CPU 점유율이 높을 때 확인할 내용 | hooni | 2015.08.26 | 8899 |
276 | Database | [mysql] DB->Text, Text->DB 변환 | hooni | 2003.04.23 | 13411 |
275 | Database | [mysql] ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. | hooni | 2017.12.15 | 5716 |
274 | Database | [mysql] error while loading shared libraries: libmysqlclient.so.10: | hooni | 2003.04.23 | 15289 |
273 | Database |
[mysql] MacOS에 MySQL 설치, 설정, 암호 재설정
![]() |
hooni | 2017.12.15 | 3800 |
272 | Database | [mysql] MySql DB/테이블 사이즈 확인을 위한 쿼리 | hooni | 2019.11.22 | 2625 |
271 | System/OS | [mysql] MySQL server has gone away 에러 대응 | hooni | 2013.05.29 | 20755 |
270 | System/OS | [mysql] mysql user 생성시 ERROR 1364 | hooni | 2013.04.25 | 29391 |
269 | Database | [mysql] MySQL 데이터베이스 추가 및 사용자 추가 | hooni | 2019.11.22 | 3081 |
268 | Database | [mysql] MySQL 백업 및 복구 | hooni | 2019.11.22 | 2883 |
267 | Database | [mysql] MySql 에서 정렬 후 그룹 하는 방법 | hooni | 2015.05.07 | 5099 |
266 | Database | [mysql] MySQL 한글 깨짐 현상 해결하기(UTF8) | hooni | 2017.12.01 | 7696 |