If you are starting a new fresh app, you need to create the Flutter App with flutter create --androidx -i swift (see flutter/flutter#13422 (comment)), otherwise, you will get this message:

=== BUILD TARGET flutter_inappwebview OF PROJECT Pods WITH CONFIGURATION Debug ===
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2, 5.0. This setting can be set in the build settings editor.

If you still have this problem, try to edit iOS Podfile like this (see #15):

target 'Runner' do
  use_frameworks!  # required by simple_permission
  ...
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '5.0'  # required by simple_permission
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Instead, if you have already a non-swift project, you can check this issue to solve the problem: Friction adding swift plugin to objective-c project.

Support HTTP (non-HTTPS) request

You need to disable Apple Transport Security (ATS) feature. There’re two options:

  • Disable ATS for a specific domain only (Official wiki): (add following codes to your Info.plist file)
    <key>NSAppTransportSecurity</key>
    <dict>
    <key>NSExceptionDomains</key>
    <dict>
      <key>www.yourserver.com</key>
      <dict>
        <!-- add this key to enable subdomains such as sub.yourserver.com -->
        <key>NSIncludesSubdomains</key>
        <true/>
        <!-- add this key to allow standard HTTP requests, thus negating the ATS -->
        <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
        <true/>
        <!-- add this key to specify the minimum TLS version to accept -->
        <key>NSTemporaryExceptionMinimumTLSVersion</key>
        <string>TLSv1.1</string>
      </dict>
    </dict>
    </dict>
    
  • Completely disable ATS (Official wiki): (add following codes to your Info.plist file)
    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key><true/>
    </dict>
    

Other useful Info.plist properties are:

  • NSAllowsLocalNetworking: A Boolean value indicating whether to allow loading of local resources (Official wiki);
  • NSAllowsArbitraryLoadsInWebContent: A Boolean value indicating whether all App Transport Security restrictions are disabled for requests made from web views (Official wiki).