TIL_20180801 ~ 20180804
01 Aug 2018 | TIL2018.08.01
- scrollview구현 (paginate, scrolling)
- HTTP POST
2018.08.02
- 언리쳐블상태에서 리쳐블로 바뀌면 StoreVC의 viewDidLoad가 실행되면서 bad access에러 나면서 앱 종료
- 리쳐블은 categories를 테이블뷰에 set하는 코드를 부르기때문에 앱 종료 인듯하다
- NetworkReachability 에러 디버깅
리쳐블 2018-08-03 11:24:01.747084+0900 StoreApp[36028:1961628] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3698.54.4/UITableView.m:2012 2018-08-03 11:24:01.756501+0900 StoreApp[36028:1961628] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (8) must be equal to the number of rows contained in that section before the update (8), plus or minus the number of rows inserted or deleted from that section (8 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).' *** First throw call stack: ( 0 CoreFoundation 0x00000001053d61e6 __exceptionPreprocess + 294 1 libobjc.A.dylib 0x0000000100f07031 objc_exception_throw + 48 2 CoreFoundation 0x00000001053db472 +[NSException raise:format:arguments:] + 98 3 Foundation 0x00000001009aa652 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193 4 UIKit 0x000000010284bd9b -[UITableView _endCellAnimationsWithContext:] + 19031 5 UIKit 0x0000000102865787 -[UITableView endUpdates] + 75 6 StoreApp 0x00000001003c3f7f _T08StoreApp0A14ViewControllerC010resetTableC033_5C3AD717C85DC9604A7179854EE8731CLLySay10Foundation9IndexPathVG10indexPaths_tFyycfU_ + 1391 7 StoreApp 0x00000001003c7381 _T08StoreApp0A14ViewControllerC010resetTableC033_5C3AD717C85DC9604A7179854EE8731CLLySay10Foundation9IndexPathVG10indexPaths_tFyycfU_TA + 17 8 StoreApp 0x00000001003c3fdd _T0Ig_IyB_TR + 45 9 libdispatch.dylib 0x000000010641e7ec _dispatch_client_callout + 8 10 libdispatch.dylib 0x000000010642b642 _dispatch_sync_thread_bound_invoke + 386 11 libdispatch.dylib 0x000000010641e7ec _dispatch_client_callout + 8 12 libdispatch.dylib 0x00000001064298cf _dispatch_main_queue_callback_4CF + 628 13 CoreFoundation 0x0000000105398c99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 14 CoreFoundation 0x000000010535cea6 __CFRunLoopRun + 2342 15 CoreFoundation 0x000000010535c30b CFRunLoopRunSpecific + 635 16 GraphicsServices 0x0000000109cb4a73 GSEventRunModal + 62 17 UIKit 0x000000010272a057 UIApplicationMain + 159 18 StoreApp 0x00000001003c83d7 main + 55 19 libdyld.dylib 0x000000010649b955 start + 1 20 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
- 동작순서
네트워크 연결 리쳐블 찍힘 viewDidLoad완료 네트워크 끊음 2018-08-03 11:35:23.739963+0900 StoreApp[36565:1986523] [] nw_socket_output_finished shutdown(8, SHUT_WR) [49: Can't assign requested address] 언리쳐블찍힘 테이블뷰 셀 reuse했더니 아래와 같은 에러 좌라라 언리쳐블 상태에서는 json과 캐시파일로 데이터를 가져오니까 로드는 되지만 네트워크 에서 log를 찍기때문에 프린트됨
// DataSetter설정시
네트워크에러: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSUnderlyingError=0x604000259740 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://crong.codesquad.kr:8080/woowa/detail/HEDFB, NSErrorFailingURLKey=http://crong.codesquad.kr:8080/woowa/detail/HEDFB, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, NSLocalizedDescription=The Internet connection appears to be offline.}
// DataSetter에서 기본 detail정보 설정할때 hash값 가져오면서 에러
데이터 에러!
2018-08-03 11:35:47.513580+0900 StoreApp[36565:1988190] TIC TCP Conn Failed [5:0x604000173740]: 1:50 Err(50)
2018-08-03 11:35:47.514749+0900 StoreApp[36565:1988190] Task <80A0484A-B224-46F5-9065-C9AA9F683E5F>.<12> HTTP load failed (error code: -1009 [1:50])
2018-08-03 11:35:47.517821+0900 StoreApp[36565:1988213] Task <80A0484A-B224-46F5-9065-C9AA9F683E5F>.<12> finished with error - code: -1009
2018.08.03
- 스토어앱 8단계
- 네트워크연결성에 따라 statusbar의 색깔 상태 변경하기(아이폰 통화중일때처럼 파랑 / 빨강 깜빡깜빡, 문구 추가)
- alamofire 연결성확인 기능 공부(NetworkReachabilityManager)
- 함수형프로그래밍: 송치원님 let us go 2018영상
2018.08.04
- statusbar 흰색글씨로 구현하기 appdelegate에서
- 참고
- readme에정리할거리임
- reachability 구현
- 질문: layoutsubview는 언제불리나요
- 블로그 글 정리하ㄱㅣ
Comments