iOS 12 공유시트에서 카카오톡이 실행되지 않습니다(재등록)

iOS 공유시트(UIActivityViewController)로 링크를 공유하고 있었는데

공유시트에서 카카오톡을 선택하면 아래와 같은 에러가 발생하면서 카카오톡이 실행(공유대상지정하는 화면)되지 않습니다.

실행코드

NSArray *postItems = @[string];

UIActivityViewController *activityViewController = [[UIActivityViewController alloc]initWithActivityItems:postItems applicationActivities:nil];

[self presentViewController:activityViewController animated:YES completion:nil];

에러 로그

Failed to load remote view controller with error: Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service named com.iwilab.KakaoTalk.Share.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.” UserInfo={NSDebugDescription=The connection to service named com.iwilab.KakaoTalk.Share.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}

답변 아직 없나요?

저도 같은 문제가 있네요. 추가적으로 다음과 같은 에러가 나오는걸 봐선, 뭔가 덜 닫힌 상태에서 카카오가 열릴려고 하는거 같은데요.

Attempt to dismiss from view controller <UINavigationController: 0x132028a00> while a presentation or dismiss is in progress!

더 희안한건 다른 앱(Files app, dayone app 등등)들에서는 카카오톡 쉐어가 잘된다는 거죠.

지금 방금 알아낸 바로는 개발중인 앱이 UISearchBar의 barTintColor를 변경하면, 그 KakaoTalk share가 작동하지 않네요. 아마 Kakao 쉐어창이 뜨면서, 서치바를 변경하다가 크래쉬가 나는듯 합니다.

[UISearchBar appearance].barTintColor = currentTheme; => 요 라인이 문제였네요.

다행히 저같은 경우는 서치바가 네비바안에 있기 때문에 다음과 같이 변경하여 해결하였습니다.

[UISearchBar appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]].barTintColor = currentTheme;

정말 감사드립니다. 말씀해주신데로 적용하니 잘 작동되네요, 어떻게 칼라설정이 SDK 를 작동하지 못하게 하는지에대한 의문은 지대합니다만, 일단 잘 해결되었습니다. 답변 감사드립니다~ ^^