title: WKWebview and <input type="file"
body: <p>I'm having a problem with <strong>WKWebView</strong> on iOS. After taping element <code>&lt;input type=&quot;file&quot; accept=&quot;image/*&quot;&gt;</code> appears ActionSheet with three options: <em>Photo Library</em>, <em>iCloud</em>, <em>Cancel</em>.</p>
  <p>Then, when I tapped <em>Photo Library</em>, ActionSheet disappears, and WebView prevent to open ActionSheet once again. I'm stuck, with uploading photos via WebView.</p>
  <p>I've added permissions in info.plist file (Privacy - Photo Library Usage Description). Here is how I create WebView</p>
  <pre><code>WKWebViewConfiguration *wkConfiguration = [[WKWebViewConfiguration alloc] init];
  wkConfiguration.allowsInlineMediaPlayback = true;
  wkConfiguration.mediaPlaybackRequiresUserAction = false;
  
  self.webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:wkConfiguration];
  
  self.webView.scrollView.bounces = NO;
  self.webView.contentScaleFactor = 2.0;
  self.webView.exclusiveTouch = YES;
  [self.webView.scrollView setDelaysContentTouches:NO];
  [self.webView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];
  
  self.webView.UIDelegate = self;
  self.webView.navigationDelegate = self;
  </code></pre>
  <p>The worst thing is that, I can't catch tap event on <em>input</em>. Maybe somebody has similar problem? I searched other topics from Stack and Apple forums, but neither helped. I will be grateful for your help.</p>
  <h1>edited</h1>
  <p>System logs are printing:</p>
  <pre><code>&lt;Error&gt;: -[NETAWDManager reportStats:metricID:] AWDServerConnection newMetricContainerWithIdentifier failed for metric 2686983, server 0x16d62570, not reporting:
  &lt;AWDLibnetcoreTCPConnectionReport: 0x16e418a0&gt; {
      cellularFallbackReport =     {
          dataUsageSnapshotsAtNetworkEvents =         (
                          {
                  bytesIn = 1999999;
                  bytesOut = 1600;
              }
          );
          &quot;fallbackTimer_msecs&quot; = 0;
          fellback = 0;
          networkEvents =         (
              &quot;NETWORK_EVENT_DATA_STALL_AT_APP_LAYER&quot;
          );
          &quot;timeToNetworkEvents_msecs&quot; =         (
              5168
          );
      };
      clientIdentifier = &quot;com.apple.WebKit.Networking&quot;;
      connectionStatisticsReport =     {
          DNSAnswersCached = 0;
          &quot;DNSResolvedTime_msecs&quot; = 0;
          RTTvariance = 0;
          &quot;appDataStallTimer_msecs&quot; = 3;
          appReportingDataStallCount = 1;
          &quot;bestRTT_msecs&quot; = 0;
          betterRouteEventCount = 0;
          bytesDuplicate = 0;
          bytesIn = 2700000;
          bytesOut = 3800;
          bytesOutOfOrder = 0;
          bytesRetransmitted = 0;
          cellularFallback = 0;
          cellularRRCConnected = 0;
          connected = 1;
          connectedInterfaceType = &quot;(unknown: 4)&quot;;
          &quot;connectionEstablishmentTime_msecs&quot; = 1;
          connectionReuseCount = 0;
          &quot;currentRTT_msecs&quot; = 0;
          &quot;flowDuration_msecs&quot; = 40208;
          interfaceType = &quot;(unknown: 4)&quot;;
          kernelReportedStalls = 0;
          kernelReportingConnectionStalled = 0;
          kernelReportingReadStalled = 0;
          kernelReportingWriteStalled = 0;
          packetsDuplicate = 0;
          packetsIn = 210;
          packetsOut = 9;
          packetsOutOfOrder = 0;
          packetsRetransmitted = 0;
          &quot;smoothedRTT_msecs&quot; = 0;
          synRetransmissionCount = 0;
          tcpFastOpen = 0;
          &quot;timeToConnectionEstablishment_msecs&quot; = 2;
          &quot;timeToConnectionStart_msecs&quot; = 1;
          &quot;timeToDNSResolved_msecs&quot; = 0;
          &quot;timeToDNSStart_msecs&quot; = 0;
          trafficClass = 0;
      };
      delegated = 1;
      reportReason = &quot;REPORT_REASON_DATA_STALL_AT_APP_LAYER&quot;;
      sourceAppIdentifier = &quot;com.supermemo.sm-com&quot;;
  }
  Jul  6 10:13:59 iPad-xxx assistantd[268] &lt;Error&gt;: tcp_connection_tls_session_error_callback_imp 7 __tcp_connection_tls_session_callback_write_block_invoke.434 error 22
  Jul  6 10:13:59 iPad-xxx assistantd[268] &lt;Error&gt;: NSURLSessionStreamTask: TCPConnection read invalidated by closed connection
  Jul  6 10:13:59 iPad-xxx networkd[87] &lt;Error&gt;: -[NETAWDManager reportStats:metricID:] AWDServerConnection newMetricContainerWithIdentifier failed for metric 2686980, server 0x16d62570, not reporting:
  &lt;AWDMPTCPConnectionReport: 0x16d3ab50&gt; {
      &quot;client_id&quot; = assistantd;
      &quot;establishment_cellular_fallback&quot; = 0;
      &quot;establishment_failure_error&quot; = 0;
      &quot;establishment_forced_tcp_fallback&quot; = 0;
      &quot;establishment_interface_name&quot; = en0;
      &quot;establishment_success&quot; = 1;
      &quot;establishment_syn_retransmits&quot; = 0;
      &quot;establishment_tcp_fallback&quot; = 0;
      &quot;establishment_time&quot; = &quot;0.0573505&quot;;
      &quot;interface_reports&quot; =     (
                  {
              &quot;data_in_KB&quot; = 5;
              &quot;data_out_KB&quot; = 2;
              &quot;interface_name&quot; = en0;
              &quot;post_connect_subflow_failure_errors&quot; =             (
              );
              &quot;post_connect_tcp_fallback_count&quot; = 0;
              &quot;secondary_flow_failure_count&quot; = 0;
              &quot;secondary_flow_success_count&quot; = 0;
          }
      );
      &quot;post_connect_multi_homed&quot; = 1;
      &quot;post_connect_session_lifetime&quot; = &quot;42.711159041&quot;;
      &quot;post_connect_single_homed&quot; = 0;
      &quot;post_connect_subflow_attempt_count&quot; = 2;
      &quot;post_connect_subflow_max_subflow_count&quot; = 1;
      &quot;subflow_switching_count&quot; = 0;
  }
  </code></pre>
  <p>WKWebView uses some safety protocol to fetch files from OS? Did anyone knows how to handle this?</p>