반응형
NSAttributedString
-
[iOS] WebSafeForwarder forwardInvocation 크래시 - NSAttributed String html 내부 동작iOS 2023. 1. 13. 21:06
어느날 [_WebSafeForwarder forwardInvocation:] 라는 크래시가 발생했다. 이에 대해 구글링을 해보니 여러 Stack Overflow 글에서 NSAttributedString 의 메서드를 사용해서 html 을 파싱할 때 간헐적으로 발생하는 크래시인 것으로 보여 관련해서 iOS 에서 NSAttributedString 으로 html 을 파싱할 때 내부적으로 어떻게 동작하는지 확인하고, 왜 크래시가 발생하는지 확인했다. 1. iOS 내부 동작 NSAttributedString 생성자 initWithData:options:documentAttributes:error: 명시된 data 객체에서 attributed string을 생성하는 메서드. 디코딩 되지 않았을 경우 nil, 그 외의..