Flutter(플러터)

[플러터/Flutter] Android and iOS setup Internet Permission.

알통몬_ 2023. 6. 16. 08:47
반응형

1. Android

// android/app/src/main/AndroidManifest.xml
<manifest>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    // Http  허용하려면
    <application
        ...
        android:usesCleartextTraffic="true"
        >
    </application>
</manifest>

2. iOS

// ios/Runner/Info.plist
<plist>
<dict>
	...
	<key>NSAppTransportSecurity</key>
	<dict>
	<key>NSAllowsArbitraryLoads</key><true/>
	</dict>
</dict>
</plist>

끝!

반응형