Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dio Package doesnot work on Flutter Desktop App

Dio is working perfectly well on both Android and iOS but when I try to run thesame code base on mac Desktop, the application launches but I cant make any http call, I cant connect to any server. It just keeps timing out. I dont know maybe DIO is not compatuble with desktop yet.

This is the error I get

DioError [DioErrorType.other]: SocketException: Connection failed 
(OS Error: Operation not permitted, errno = 1), 
address = api.wykinkin.app, port = 443
like image 305
Onalo Joseph Avatar asked Oct 21 '25 05:10

Onalo Joseph


1 Answers

I later discovered I needed to add:

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

to my macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements. from here

like image 180
Onalo Joseph Avatar answered Oct 26 '25 15:10

Onalo Joseph