useWebKit=true doesn't appear to use WKWebView

Please provide the following:

  1. SDK Version: 33.0.0
  2. Platforms(ios/android/both): IOS

I’m getting a warning from Apple regarding the usage of UIWebView in my expo app (in Testflight). From the documentation, I thought that using useWebKit={true} would use the WKWebView version, but after enabling it and uploading to the store, I continue to get the same warning. My WebView looks like this:

      <WebView
      style={styles.container}
      javaScriptEnabled={true}
      domStorageEnabled={true}
      useWebKit={true}
      cacheEnabled={false}
      source={{ uri: this.state.url  }}
      >
      <View><Text style={{color: 'white', fontSize: 24}}>testing</Text></View>
      </WebView>

I started getting this warning via email from Apple too. Here is part of the message from Apple (for what it’s worth):

  • ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See Apple Developer Documentation for more information.

I’m on Expo SDK 34 and installed react-native-webview via expo install, which installed version react-native-webview 5.12.1. From what I understand, Apple detects that my app has UIWebView bundled into it, even if I’m not calling UIWebView (similar to your code example, above).

In an effort to fix this, react-native-webview was just updated (see issue here) to remove UIWebView completely. Hopefully a future Expo update will bring in that release soon (maybe in SDK 35???).

An important thing to note, though, is that other React Native dependencies can also use UIWebView and thus also cause the deprecation warning from Apple (you can always search through your node_modules folder for those).

1 Like

Hey @salus and @aerus,

Please follow this thread: Received mail from Apple about the Deprecated API: UIWebView - #13 by boro-tech for updates regarding UIWebView.

A quick synopsis is that we are actively removing instances of UIWebView in our codebase and we hope to have a UIWebView-free version out as soon as we can without risking stability. So far it seems Apple is just warning users as several Expo developers have reported that their apps are still getting approved.

Cheers,
Adam

1 Like

Thanks @adamjnav! I had somehow missed that thread. Any chance there’s also a GitHub issue we can follow along with, since Expo forum posts are auto-closed after a while?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.