Reputation: 2059
I work in the Xcode 10 beta and iOS 12. Here is code snippet that appeared to be fine and do what it should do:
DispatchQueue.global().async {
guard let imageUrl = URL(string: course.imageUrl!) else { return }
guard let imageData = try? Data(contentsOf: imageUrl) else { return }
DispatchQueue.main.async {
cell.courseImage.image = UIImage(data: imageData)
}
}
Next line:
guard let imageData = try? Data(contentsOf: imageUrl) else { return }
causes in simulator on iOS 12 next output in the console:
2018-09-07 12:02:25.045814+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_errorlog(224) [C1.1:2][0x7fccdf534820] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library 2018-09-07 12:02:25.045951+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_handshake_error_print(205) [C1.1:2][0x7fccdf534820] 140517895636904:error:100000d7:SSL
routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/boringssl-109.200.32/ssl/ssl_lib.cc:1081: 2018-09-07 12:02:25.046072+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_errorlog(224) [C1.1:2][0x7fccdf534820] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library 2018-09-07 12:02:25.046208+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_handshake_error_print(205) [C1.1:2][0x7fccdf534820] 140517895636904:error:100000d7:SSL
routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/boringssl-109.200.32/ssl/ssl_lib.cc:1081: 2018-09-07 12:02:25.049462+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_errorlog(224) [C1.1:2][0x7fccdf534820] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library 2018-09-07 12:02:25.049585+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_handshake_error_print(205) [C1.1:2][0x7fccdf534820] 140517895636904:error:100000d7:SSL
routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/boringssl-109.200.32/ssl/ssl_lib.cc:1081: 2018-09-07 12:02:25.049732+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_errorlog(224) [C1.1:2][0x7fccdf534820] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library 2018-09-07 12:02:25.049998+0500 Networking[69467:3561679] [BoringSSL] boringssl_session_handshake_error_print(205) [C1.1:2][0x7fccdf534820] 140517895636904:error:100000d7:SSL
routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/boringssl-109.200.32/ssl/ssl_lib.cc:1081:
If I run iOS 11.4 simulator so message in the console will be other one and it appears after around 10-15 seconds:
[BoringSSL] Function boringssl_session_errorlog: line 2881 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
Why this messages are in the console if I'am just trying as usual to get Data from the URL?
Upvotes: 1
Views: 1544
Reputation: 402
Don’t worry, it’s not your fault. It’s OS logging and fortunately, you can turn it off.
Open Product ▶️ Scheme ▶️ Edit Scheme … Select Run On Environment Variables, add OS_ACTIVITY_MODE with value disable
Upvotes: 0
Reputation: 2059
Appeared to be just console trash that was removed by:
Hope that will help someone.
Upvotes: 3