/ FLUTTER, IOS

플러터 iOS 앱 실행시 iproxy 관련 경고가 뜨며 앱이 실행되지 않는다면?

플러터 개발 도구를 갓 설치한 분들이라면, 플러터 프로젝트를 iOS에서 실행할 때 스플래시 화면만 뜨고 멈춰있는 현상을 마주할 가능성이 있습니다.

이 때 콘솔 로그를 보면, 다음과 같이 VM Service에 연결하지 못하고 있다는 메시지를 확인할 수 있습니다.

[connection] nw_endpoint_handler_set_adaptive_read_handler [C2.1 142.250.196.106:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for read_timeout failed
[connection] nw_endpoint_handler_set_adaptive_write_handler [C2.1 142.250.196.106:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for write_timeout failed
Connecting to the VM Service is taking longer than expected...
Still attempting to connect to the VM Service...
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.
[connection] nw_endpoint_handler_set_adaptive_read_handler [C3.1 142.250.196.106:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for read_timeout failed
[connection] nw_endpoint_handler_set_adaptive_write_handler [C3.1 142.250.196.106:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] unregister notification for write_timeout failed
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 49319
This was attempt #50. Will retry in 0:00:01.600000.

이러한 현상은 플러터 개발 도구 중 iOS 앱을 실행할 때 사용하는 도구가 컴퓨터 보안 설정 때문에 차단되었을 때 발생하며, 문제가 발생하면 다음과 같이 iproxy 개발자를 확인할 수 없다는 메시지 (macOS cannot verify the developer of “iproxy”)가 표시됩니다.

이를 해결하려면, 위 메시지가 표시된 후 시스템 환경설정 (System Preferences) > 보안 및 개인 정보 보호 (Security & Privacy)로 이동합니다.

화면 내 다음에서 다운로드한 앱 허용 (Allow apps downloaded from)을 보면 iproxy가 차단되었다는 메시지를 확인할 수 있을 것입니다. 여기에서 허용(Allow anyway) 버튼을 눌러 iproxy를 허용해 주면 됩니다.

이제 플러터 프로젝트로 돌아와 다시 iOS 앱을 실행하면, 스플래시 화면 후 정상적으로 앱이 실행되는 것을 확인할 수 있습니다.

kunny

커니

안드로이드와 오픈소스, 코틀린(Kotlin)에 관심이 많습니다. 한국 GDG 안드로이드 운영자 및 GDE 안드로이드로 활동했으며, 현재 구글에서 애드몹 기술 지원을 담당하고 있습니다.

Read More