Flutter IOS / android에서 http 사용 설정법
2022. 10. 18. 16:16ㆍ프로그래밍 언어/Flutter
IOS
ios 폴더 > Runner 폴더 >Info.plist 제일 하단에서 </dist> </plist> 위에
아래 코드 삽입하면 ios 에서 http 사용가능
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSAllowsArbitaryLoadsInWebContent</key>
<true/>
</dict>
Android
android 폴더 > app 폴더 > src 폴더 > AndroidManifest.xml 파일
아래 두줄을
<uses-permission android:name="android.permission.INTERNET"/> <!-- 인터넷을 사용할 수있게 하는 권한 -->
android:usesCleartextTraffic="true" <!-- http 허용 -->
아래 그림처럼 넣어준다.
'프로그래밍 언어 > Flutter' 카테고리의 다른 글
[Flutter] DateTime 및 Duration (0) | 2022.10.22 |
---|---|
[Flutter] 이미지 자동 슬라이드 프로젝트(PageView,Timer) (0) | 2022.10.22 |
WebView 사용법 (0) | 2022.10.17 |
[Flutter] Row and Column (0) | 2022.10.13 |
INSTALL_FAILED_INSUFFICIENT_STORAGE 해결법 (0) | 2022.10.10 |