Received mail from Apple about the Deprecated API: UIWebView

Hey @brightlink & @dlyt0911,

As far as we’re aware we’ve removed all direct dependencies but there’s still the possibility that some external dependencies are using it. We’ll be making absolute sure that the next version has no instances of UIWebView in it.

Cheers,
Adam

1 Like

Hi @adamjnav , thanks for the quick response. I took the following steps, to no avail:

  1. Update to SDK 35
  2. rm -rf node_modules
  3. npm install

Once i did npm install, UIWebView continued to appear in useragent.js & useragent.js.flow , but it appeared to be commented out in every occurence. Not sure if that’s helpful to you, or anyone else facing this issue.

Do you have a tentative timeline for when we can expect the next version? We are nearing the launch of our app, so a bit skeptical about launching with this error.

I don’t think it will cause any problems? I submitted my app using SDK 35. I received no warnings and it got approved a few hours ago.

Hi @dlyt0911.

Is your app ejected?
What are the dependencies?

By the way, this is not an error. It’s a nebulous warning from Apple that at some unspecified point in the future they will start rejecting submissions of apps using UIWebView.

I also still receive the warning when uploading a new build with SDK 35 and a not ejected project.

I searched for UIWebView in my project and that is the result:

grep -r UIWebView node_modules/*
node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/metro/node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/metro/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/react-native/node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/react-native/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/react-native/Libraries/Components/WebView/WebView.android.js:     * If true, use WKWebView instead of UIWebView.
node_modules/react-native/Libraries/Components/WebView/WebView.ios.js:     * If true, use WKWebView instead of UIWebView.
node_modules/react-native-web/node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/react-native-web/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/ua-parser-js/test/browser-test.json:        "ua"      : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Mobile/14A456 QQ/6.5.3.410 V1_IPH_SQ_6.5.3_1_APP_A Pixel/1080 Core/UIWebView NetType/WIFI Mem/26",

So it seems that its just included in comments, so why do I still receive the warning?

I think it would be native code using UIWebView, so it might not appear in the JavaScript in node_modules at all. But it’s rather strange because there are no longer any references to UIWebView in the expo Objective-C code either as far as I can see (as of SDK 35).

It would be interesting to poke around with a decompiler (e.g. IDA Freeware or Hopper etc.) to see where it’s being referenced.

Thanks for your response @wodin.

I always thought that my project will not have custom native code as long as I do not eject and run any react-native link. So in theory I should not have any native code others with SDK 35 do not have or can that still happen with a dependency?

I’m also not really sure what I need to do in order to decompile and check for usages in native code.

Yes, unless I am missing something you are absolutely right. That’s why this is so confusing. Some people are getting the warning from Apple and others are not and there do not appear to be any references to UIWebView in Expo’s native code.

About decompiling, I’m not 100% sure myself. I have not bought an Apple developer account yet, so I don’t have any IPAs to test this with. I have never used Hopper and have only fiddled with IDA a little (and then not with iOS binaries). In theory you could open the IPA (or maybe extract the binaries from it and then open those) using e.g. IDA and search for UIWebView. That might give you some idea of what’s referencing it. Or it might be a big waste of time.

Hey @adamjnav!

I have a small question: do we have any issue on github related to this problem? I’m asking because I saw the roadmap for SDK 36 (https://github.com/orgs/expo/projects/4) and I didn’t find there any ticket related to UIWebView problem. I’m not sure if I should wait for the new SDK or I should look for some workarounds?

Thanks!
Robert

1 Like

@adamjnav This is a problem that needs to be solved quickly. Even if you want to leave Apple right away, you can’t because there are too many users. We look forward to your prompt resolution of this problem because it won’t work if you complain to Apple.