To get the fix, make sure to upgrade to SDK 36 (if you haven’t already), re-build with expo build:ios, and you're all set! If you use turtle-cli, then upgrade to [email protected], and rebuild from there.
Just to be clear- Apple has not indicated that they will remove apps currently on the App Store that use UIWebView, only that they will begin to reject new submissions in April.
https://github.com/expo/expo/issues/5497#issuecomment-600064084
Expo CLI 3.0.9 environment info:
System:
OS: macOS 10.14.6
Shell: 3.0.2 - /usr/local/bin/fish
Binaries:
Node: 10.16.2 - /usr/local/opt/node@10/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.1 AI-173.4720617
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
expo: ^33.0.0 => 33.0.3
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8
react-navigation: ^3.11.0 => 3.11.0
npmGlobalPackages:
expo-cli: 3.0.9
Target: iOS, Android
Submit app built with Expo SDK33, to Apple's App Store
Successful submission.
Apple accepted the app but included a notice about deprecated API usage in their usual email.
Dear Developer,
We identified one or more issues with a recent delivery for your app, <redacted>. Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.
Best regards,
The App Store Team
Submit an app built with Expo SDK33 to Apple's App Store
There are references in both React Native (https://github.com/facebook/react-native/issues/26255) and react-native-webview (https://github.com/react-native-community/react-native-webview/issues/312 and https://github.com/react-native-community/react-native-webview/issues/819)
Please note that we are NOT using UIWebView in our app at all, it seems to be included by default with the Expo SDK
So far, I've seen the following packages that use UIWebView (in node_modules):
Just got this message from AppStore connect as well!
I am facing this issue as well.
A few good solutions here:
https://github.com/react-native-community/react-native-webview/issues/819
I can't see any solutions there that are applicable for expo applications? Our app also received the notifications and we are not using UIWebView ourself directly.
It seems that react native itself (and fbjs?) is the only dependency using UIWebView which should affect all expo projects. So I guess we need to wait for a new expo SDK with an updated react native version?
I updated webview (7.0.1+), but this will need a new sdk version from expo since changes are native
@ide is it possible to create a patch for SDK33 ? And SDK34 I guess.
This is a warning but not an error from App Store Connect. We believe that Apple is sending these notices because they plan to remove UIWebView in a future version of iOS (not iOS 13.0) and since UIWebView is such a widely used API, they are proactively notifying people.
We are working on removing UIWebView from various modules, starting with SDK 35. There may be still some parts of SDK 35 that use UIWebView — we need to remove it from each dependency, which takes time — so this may not be complete until SDK 36 or later.
In short, we are working to address the actual issue — that UIWebView is going away in a future version of iOS — and for now you do not have to do anything if you get the notice. In the meantime, keep your SDK version up to date so it is easier to upgrade to the next UIWebView-less version when the time comes.
@aeife
You can either update React Native to 0.60+ or you can manually remove deprecated libraries from the project.
You can use the ruby code to delete the reference
# remove UIWebView in React
require 'xcodeproj'
react_path = File.join(File.dirname(__FILE__), "./node_modules/react-native/React/React.xcodeproj")
react_project = Xcodeproj::Project.open(react_path)
react_project.main_group["React/Views"].files.each do |file|
if file.path.match(/^*RCTWebView/)
file.remove_from_project
puts "#{file.path} is removed"
end
end
react_project.save
I not using Expo and I found that the library fbjs (if this library is not presents the project not works) contains the UIWebView.
MacBook-Pro-$ 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
@davidcort that command is useful, but how do I know if it save to remove those files rather than those files are needing to be upgraded....
Can someone please confirm an App Store submission and that they have been successful like @ide suggested?
@to-jk11 We had successfully submitted two versions of our app to the store after getting the warning.. We are on the Expo SDK v34..
The latest Expo client contains UIWebView in it and was accepted. Additionally in SDK 35 we believe we've removed UIWebView, though to be 100% sure I recommend looking through your Mach-O's strings.
I still receive the warning email from apple after uploading a new build with SDK 35. How can I check Mach-O strings in an expo project?
According to the topic in the expo forum other users also still receive the warning with sdk 35: https://forums.expo.io/t/received-mail-from-apple-about-the-deprecated-api-uiwebview/27117/16
Yes, I also thought that SDK35 fixed this, but the warning is still there - I upgraded last week and published a new app today and I still received the warning email.
I send mi app with react-native 0.61.1 and update the plugin react-native-device-info to ^3.1.4. The warning not showing anymore.
Hi guys. The same error after submission to App Store despite we are using Expo sdk35. We are looking forward to updates from your side.
In Bare apps: The solution is did some changes:
-Update RN to 0.60.X
-Change the plugin webview for in app browser.
Lucky !!
Had the same issue yesterday with an Expo app. (not ejected)
Fingers crossed that we'll pass the App store.
Edit:
When inspecting the app package in XCode we do still see a lot of UIWebView references.
Hey everyone, we're inspecting this in SDK 36 but as for right now it should not prevent your app from being approved (it's just a warning)
Hey, react-native community. We are using brand new react-native '0.61.2'. And still getting this warning ⚠️ after we submitted the app on the app store connect.
Here is our list of modules which needs to be updated in the future:
grep -r UIWebView node_modules/*
node_modules/create-react-class/node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView
node_modules/create-react-class/node_modules/fbjs/lib/UserAgent.js: * - UIWebView
node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView
node_modules/fbjs/lib/UserAgent.js: * - UIWebView
node_modules/jsc-android/dist/include/JSContextPrivate.h:/*! @abstract The delegate the context will use when trying to load a module. Note, this delegate will be ignored for contexts returned by UIWebView. */
node_modules/react-addons-shallow-compare/node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView
node_modules/react-addons-shallow-compare/node_modules/fbjs/lib/UserAgent.js: * - UIWebView
node_modules/react-native-dropdownalert/node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView
node_modules/react-native-dropdownalert/node_modules/fbjs/lib/UserAgent.js: * - UIWebView
node_modules/react-native-webview/README.md:- [7.0.1](https://github.com/react-native-community/react-native-webview/releases/tag/v7.0.1) - Removed 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",
Thanks.
There is an open discussion on Expo forums related to this Github issue - it might give you some extra informations.
I'm facing this issue with SDK 35 (not eject).
I am facing the same issue with SDK 35 ( not eject)
I am facing the same issue with SDK 35 (not eject), too. Any Updates?
Hey guys, this will be fixed in SDK36.
Received the warning after submitting an app with SDK36 (not ejected)
Received the warning after submitting an app with SDK36 (not ejected)
@timomeh Same
Received the warning after submitting an app with SDK36 (not ejected)
Same for me
Same for us
+1
+1
Hey all, we are aware of this issue, let me reopen it so you're aware of the fact that we're aware too.
I have the same issue in SDK 36. Are we to be expecting a fix in 36 or do I take it that 37 is where it is being fixed? If so, what is the ETA for SDK 37 please?
The commits that remove what we believe to be the last vestiges of UIWebView will go out with SDK 37. Namely, the UIWebView references were in third-party dependencies like AdMob and the Facebook SDK. We are planning for SDK 37 to be released by March 31.
As said above, this issue has been fixed by #6593 and will be out with SDK37, so I'm closing it.
Sorry but since SDK 36, and SDK 37 have breaking changes, it's not possible for some to update it. You must present some kind of fix, for at least 34, 35 and 36. Because right now, I have a really complex app, and I prefer to rewrite the app in native technologies, then trying to fix all breaking changes.
I just cannot afford to wait until 31st March to check if my all will still work
@rafmrs we are in the midst of backporting this to SDK 36
That is great news, thank you 🙂
Any news of backporting the fix for SDK 36? Apple will stop accepting submissions starting from April 2020, only two weeks left.
Hmm...I've upgraded expo and redeployed my app to TestFlight on 12-03 and I did not receive the "warning" email from App Store. I am using expo 36.0.2. Is it possible that the fix is already back ported?
Yes, this fix was back-ported to SDK 36!
To get the fix, make sure to upgrade to SDK 36 (if you haven’t already), re-build with expo build:ios, and you're all set! If you use turtle-cli, then upgrade to [email protected], and rebuild from there.
Just to be clear- Apple has not indicated that they will remove apps currently on the App Store that use UIWebView, only that they will begin to reject new submissions in April
Great! Thanks for the fast responses 👍 Yes I'm using turtle-cli and shall upgrade them both
@cruzach We're using expo-ads-admob in SDK 36 and can't get https://github.com/expo/expo/commit/d7e892be49a23848c60a243f14e1e14973f9f4a4#diff-104616cd218185668cdd95c8979bb226 until a new npm package is published, could you please do that? Thanks!
The native code is updated on our builders, so there's no need for you to upgrade your packages. Like I said, if you're already on SDK 36, then all you need to do to get the fix is rebuild 😄
@cruzach we're ejected to ExpoKit so I think we and bare workflow users rely on an npm publish.
I think you should be able to get the fix for expokit just by updating the ExpoKit tag in your ios/Podfile to "ios/2.14.6", followed by pod update and pod install
@cruzach did all that, we merge in from a diff of a blank ExpoKit project to ensure we don't miss anything. But we have expo-ads-admob as an npm dependency, which I believe is the correct way to add it for ExpoKit and bare workflow, so we're not yet getting the updated EXAdsAdMob.podspec.
thanks for the heads up @mjgallag ! We've just published [email protected] (and [email protected] and [email protected]) with the UIWebView fix. Let us know if you have any issues with that.
@esamelson thanks, will try first thing tomorrow!
@esamelson looking good, thanks!
// Podfile.lock
- EXAdsAdMob (8.0.1):
- Google-Mobile-Ads-SDK (= 7.55.1)
@cruzach
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).
Now apple rejects these builds. After upgrading to Expo SDK ver 35 -> 37, it works. Thank you!
@cruzach What are the chances of getting this backported to Expo 35? React Native 0.61 has bugs that make it unusable for deep linking or push notifications on Android when the app is not currently running so we are stuck on Expo 35.
Unlikely, are there open github issues for the problems you're having with deep linking and push notifications?
@cruzach Thanks for the reply! I initially raised a ticket in Expo, thinking it was an expo bug. See here: https://github.com/expo/expo/issues/8408
Since realising it was actually an upstream RN issue, I added a comment to an existing RN issue:
Let me know if there's any other info I can provide!
Most helpful comment
This is a warning but not an error from App Store Connect. We believe that Apple is sending these notices because they plan to remove UIWebView in a future version of iOS (not iOS 13.0) and since UIWebView is such a widely used API, they are proactively notifying people.
We are working on removing UIWebView from various modules, starting with SDK 35. There may be still some parts of SDK 35 that use UIWebView — we need to remove it from each dependency, which takes time — so this may not be complete until SDK 36 or later.
In short, we are working to address the actual issue — that UIWebView is going away in a future version of iOS — and for now you do not have to do anything if you get the notice. In the meantime, keep your SDK version up to date so it is easier to upgrade to the next UIWebView-less version when the time comes.