---
# System prepended metadata

title: '『Flutter』 macOS SocketException : Connection failed'
tags: [Flutter]

---

# 『Flutter』 macOS SocketException : Connection failed
###### tags: `Flutter`


開發macOS使用Dio時遇到網路問題

> Unhandled Exception: SocketException: Connection failed (OS Error: Operation not permitted, errno = 1), address = v2.api.dailypics.cn, port = 443



從 macos/Runner/ 找到 DebugProfile.entitlements 並加入以下權限


><key>com.apple.security.network.client</key>
><true/>
