카카오 플친으로 채팅을 열려고 하는데
libc++abi.dylib: terminating with uncaught exception of type KCMException
에러가 나면서 앱이 죽습니다.
카카오 로그인 연동은 아무런 문제 없이 작동하는데 KPFPlusFriend(id: kakaoPlusFriendID).chat()
을 호출할때 위와같은 에러와 함께 앱이 종료됩니다.
sdk 버전은 1.12.1입니다.
카카오 플친으로 채팅을 열려고 하는데
libc++abi.dylib: terminating with uncaught exception of type KCMException
에러가 나면서 앱이 죽습니다.
카카오 로그인 연동은 아무런 문제 없이 작동하는데 KPFPlusFriend(id: kakaoPlusFriendID).chat()
을 호출할때 위와같은 에러와 함께 앱이 종료됩니다.
sdk 버전은 1.12.1입니다.
@hhs1120
plist에 앱키 입력하셨나요?
해당 에러 로그의 위쪽을 보시면 아래와 같이 callstack과 에러 원인이 출력됩니다.
*** Terminating app due to uncaught exception 'KakaoException', reason: '"KAKAO_APP_KEY" is not set properly in plist.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001066ba1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x0000000105d4a031 objc_exception_throw + 48
2 Debugger 0x00000001053421b9 +[KCMConfiguration defaultConfiguration] + 297
3 Debugger 0x00000001052ed24f -[KPFPlusFriend initWithId:] + 367
4 Debugger 0x00000001052c86dc $sSo13KPFPlusFriendC2idABSS_tcfcTO + 44
5 Debugger 0x00000001052c6e92 $sSo13KPFPlusFriendC2idABSS_tcfC + 50
6 Debugger 0x00000001052c7194 $s8Debugger17PlusFriendSectionCACycfcyycfU0_ + 756
7 Debugger 0x00000001052a0726 $s8Debugger14ViewControllerC05tableB0_14didSelectRowAtySo07UITableB0C_10Foundation9IndexPathVtF + 1510
8 Debugger 0x00000001052a087e $s8Debugger14ViewControllerC05tableB0_14didSelectRowAtySo07UITableB0C_10Foundation9IndexPathVtFTo + 158
9 UIKit 0x0000000107bbee89 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1813
10 UIKit 0x0000000107bbf0a4 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 344
11 UIKit 0x0000000107a8b4b3 _runAfterCACommitDeferredBlocks + 318
12 UIKit 0x0000000107a7a71e _cleanUpAfterCAFlushAndRunDeferredBlocks + 388
13 UIKit 0x0000000107aa8ea5 _afterCACommitHandler + 137
14 CoreFoundation 0x000000010665c607 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
15 CoreFoundation 0x000000010665c55e __CFRunLoopDoObservers + 430
16 CoreFoundation 0x0000000106640b81 __CFRunLoopRun + 1537
17 CoreFoundation 0x000000010664030b CFRunLoopRunSpecific + 635
18 GraphicsServices 0x000000010cf6ba73 GSEventRunModal + 62
19 UIKit 0x0000000107a80057 UIApplicationMain + 159
20 Debugger 0x00000001052d700b main + 75
21 libdyld.dylib 0x000000010c1b2955 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type KCMException
info.plist 안에
<key>KAKAO_APP_KEY</key>
<string>앱키</string>
위와같이 앱키가 입력되어 있습니다.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>kakao앱키</string>
<string>kakaokompassauth</string>
<string>kakaotalk</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>kakaologinSchmes</string>
<key>CFBundleURLSchemes</key>
<array>
<string>kakao앱키</string>
</array>
</dict>
</array>
위와 같은 내용을 info.plist 안에 포함하고 있는데 플러스 친구 프레임워크를 추가할때 더 추가해야 할 내용이 있나요??
@hhs1120
KCMException의 reason이 어떻게 찍히는지 로그를 보여주시겠어요?
2019-06-17 16:29:09.018359+0900 freshyoung[1443:268768] *** Terminating app due to uncaught exception 'KakaoException', reason: 'The URL could not be created.'
*** First throw call stack:
(0x1ef89d27c 0x1eea779f8 0x102e1d61c 0x102aa4e20 0x102aa4b8c 0x102c5d578 0x102c5d674 0x21c1a5040 0x21bc4e1c8 0x21bc4e4e8 0x21bc4d554 0x21bdc7074 0x21bdc514c 0x21bdc4f2c 0x21c1dd510 0x21c1bd59c 0x21c283714 0x21c285e40 0x21c27f070 0x1ef82f018 0x1ef82ef98 0x1ef82e880 0x1ef8297bc 0x1ef8290b0 0x1f1a2979c 0x21c1a3978 0x102bb3998 0x1ef2ee8e0)
libc++abi.dylib: terminating with uncaught exception of type KCMException
입니다.
디버깅 로그 보면서 답을 찾아서 남깁니다.
일단 콘솔에 OS 단의 로그들을 출력 안하기 위해 앱 schemes 에서 OS_ACTIVITY_MODE 를 disable 해놨었는데 이걸 잊어버리고 있어서 정확한 이유가 로그로 출력되지 않아서 헤매게 된게 가장 큰 이유였네요…
로그에서 URL 오픈을 못하는걸 보고 플친 아이디를 다시 한번 확인해봤는데, 플친검색용 아이디를 넣어서 열려고 계속 시도를 하니까 열지 못하고 죽는것 같더군요. 플친 검색용 아이디 대신 홈URL 에 표시되는 ‘_영어’ 아이디를 사용해 열어보니 문제없이 열립니다.