Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITMS-90809: Deprecated API Usage UIWebView #26255

Closed
imbudhiraja opened this issue Aug 29, 2019 · 51 comments
Closed

ITMS-90809: Deprecated API Usage UIWebView #26255

imbudhiraja opened this issue Aug 29, 2019 · 51 comments
Labels
Bug Component: WebView Related to the WebView component. Resolution: Locked This issue was locked by the bot.

Comments

@imbudhiraja
Copy link

React Native version: 0.60.5

Issue Description
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.

@react-native-bot react-native-bot added the Component: WebView Related to the WebView component. label Aug 29, 2019
@Yathousen
Copy link

If you're using react-native-webview @imbudhiraja, take a look at:
react-native-webview/react-native-webview#312

@Maxwell2022
Copy link

We've received the same warning and are not using any webview

@wuweijian1997
Copy link

I've made the same mistake. Is there a solution? I didn't use react-native-webview

@rcchen
Copy link

rcchen commented Aug 30, 2019

Just got the same email, I'm guessing it might be expo related? Because I'm otherwise doing pretty vanilla stuff on top of expo

@Maxwell2022
Copy link

more information here: react-native-webview/react-native-webview#819

@imbudhiraja
Copy link
Author

@Maxwell2022 @Yathousen no I'm not using react-native-webview

@Maxwell2022
Copy link

@Maxwell2022 @Yathousen no I'm not using react-native-webview

In the referenced issue they are also talking about other possible sources for this warning.

  • using RN 0.59.x
  • using modules that depend on react-native-webview

@Titozzz
Copy link
Collaborator

Titozzz commented Aug 30, 2019

To fix this you need to update to RN0.60+,this is when WebView was extracted and use react-native-webview (if you need it) 7.0.1+

@Titozzz Titozzz closed this as completed Aug 30, 2019
@Titozzz
Copy link
Collaborator

Titozzz commented Aug 30, 2019

(OR dirty fix but if you really can't upgrade remove the RTCUIWebView.* from react-native deps files with a postinstall/patch)

@AiTranXuan
Copy link

AiTranXuan commented Sep 3, 2019

How to check libary using Webview Deprecated API,
I upgraded react-native-webview to version 7.0.1 android react-native 0.59.10.
I can't pushlish my app to TestFlight. Please help me!

My package.json:
"@ptomasroos/react-native-multi-slider": "^1.0.0",
"@react-native-community/async-storage": "^1.6.1",
"@react-native-community/netinfo": "^3.2.1",
"appcenter": "^2.3.0",
"appcenter-analytics": "^2.3.0",
"appcenter-crashes": "^2.3.0",
"axios": "^0.19.0",
"d3-scale": "^3.0.1",
"d3-shape": "^1.3.5",
"hoist-non-react-statics": "^3.3.0",
"immer": "^3.2.0",
"intl": "^1.2.5",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.15",
"lottie-react-native": "^2.6.1",
"moment": "^2.24.0",
"query-string": "^6.8.2",
"react": "16.9.0",
"react-intl": "^2.9.0",
"react-native": "0.59.10",
"react-native-app-auth": "^4.4.0",
"react-native-chart-kit": "^3.2.0",
"react-native-communications": "^2.2.1",
"react-native-config": "^0.11.7",
"react-native-dash": "^0.0.9",
"react-native-device-info": "^3.0.0-rc.1",
"react-native-fast-image": "^6.1.1",
"react-native-firebase": "^5.5.6",
"react-native-gesture-handler": "^1.3.0",
"react-native-gifted-chat": "^0.9.11",
"react-native-image-crop-picker": "^0.25.0",
"react-native-image-picker": "^0.28.1",
"react-native-image-resizer": "^1.0.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-modal": "^11.3.1",
"react-native-reanimated": "^1.2.0",
"react-native-render-html": "ATranDev/react-native-render-html",
"react-native-root-toast": "^3.1.2",
"react-native-share": "1.1.3",
"react-native-snap-carousel": "^3.8.0",
"react-native-sortable-grid": "^2.0.0",
"react-native-splash-screen": "3.2.0",
"react-native-star-rating": "^1.1.0",
"react-native-super-grid": "^3.0.8",
"react-native-svg": "^9.6.2",
"react-native-svg-charts": "^5.3.0",
"react-native-swipeout": "^2.3.6",
"react-native-tab-view": "^2.10.0",
"react-native-vector-icons": "6.6.0",
"react-native-webview": "^7.0.1",
"react-navigation": "^3.12.1",
"react-navigation-hooks": "^1.0.1",
"react-redux": "^7.1.1",
"redux-saga": "^1.0.5",
"redux-unfold-saga": "^1.3.4",
"reselect": "^4.0.0",
"url": "^0.11.0",
"yup": "^0.27.0"

@mptorz
Copy link

mptorz commented Sep 3, 2019

@AtranDev Maybe try grep -r UIWebView node_modules/*

@HiralBarot1512
Copy link

To fix this you need to update to RN0.60+,this is when WebView was extracted and use react-native-webview (if you need it) 7.0.1+

(OR dirty fix but if you really can't upgrade remove the RTCUIWebView.* from react-native deps files with a postinstall/patch)

Do you have any sample for patch ? I am very new to react native and facing this issue and at this stage i can't take a risk to upgrade react native ?
Please help!

@mptorz
Copy link

mptorz commented Sep 5, 2019

@HiralBarot1512
Do you use cocoapods? We put something like that in our Podfile's post_install

react_project = Xcodeproj::Project.open("../node_modules/react-native/React/React.xcodeproj")
    react_project.main_group["React/Views"].files.each do |file|   
      if file.path.match(/^RCTWebView/) 
        file.remove_from_project
      end   
    end   
react_project.save

We also removed or upgraded all packages that were using this deprecated Webview (like for example react-native-device-info.

@Gypsyer
Copy link

Gypsyer commented Oct 3, 2019

In my case.
Long time i used HockeySDK in Podfile.
Solved : Remove HockySDK in Podfile -> Delete Podfile folder and Podfile.log in ios path -> Pod install.
Worked for me.

jdanbrown added a commit to jdanbrown/birdgram that referenced this issue Jan 4, 2020
…ted UIWebView error from app store

- Problem
  - Email after upload: `ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs`
  - Our react-native is really old and still has RCTWebView
- Solution
  - Rip out RCTWebView
    - `find node_modules/react-native/ | grep RCTWebView | xargs trash`
    - From facebook/react-native#26255 (comment)
  - Future react-native versions move WebView out to https://github.com/react-native-community/react-native-webview
    - facebook/react-native#16792 (comment)
@lgenzelis
Copy link

lgenzelis commented Mar 9, 2020

@mptorz I love you man! Those lines were a life saver 😄

We put something like that in our Podfile's post_install

@brascene
Copy link

We tried @mptorz's post_install script, but we're still receiving the same warning, any updates on this?

@cgdstnc
Copy link

cgdstnc commented Mar 12, 2020

hi try grepping pods folder
check

@Brad19
Copy link

Brad19 commented Mar 20, 2020

@BBTurtle, @mikehardy I'm getting the similar one as @BBTurtle. Here people have had UIwebview issues in a different forms and came up with a solution. Gr8 to c that. But from my side, I thought of upgrading the following libraries with the version mentioned below would fix the issue as one of the members suggested. But it still didn't fix it.

react-native-web-view: 7.0.1
react-native-device-info: 5.2.1

My existing react-native version: 0.59.10

After upgrading the above-mentioned web-view and device-info, when I did
grep -r UIWebView node_modules/*

I c the following.

image

I'm also seeing this

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/create-react-context/node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView node_modules/create-react-context/node_modules/fbjs/lib/UserAgent.js: * - UIWebView node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView node_modules/fbjs/lib/UserAgent.js: * - UIWebView

Here are my questions:

  1. Should I upgrade react-native-threatmetrix?
  2. Do I need to do anything on this "fbjs/lib/UserAgent."or Can I ignore?

In here, one of them has suggested including post-install scripts in Podfile. Is that the only solution or can we do anything without touching the scripts?

Thanks in advance

@mikehardy
Copy link
Contributor

Images are hard to decipher, text is preferred.
1- yes
2- Those all appear to be comments.
3- if you are fully upgraded, no? but each project has it's own priorities and needs

@Brad19
Copy link

Brad19 commented Mar 21, 2020

@mikehardy
Thanks for your immediate response. Apologies for the image sent as i thought it won't occupy more space. But if you need text, I can send it as well.

My actions after your response

  1. Upon investigating a bit, I found that there is no upgrade for react-native-threatmetrix releases for long time. And what I found is that the default usage of webView in our app which is set to false upon initializing the ReactNativeThreatMetix call. Please note that react-native-threatmetrix is used as a dev dependency only. So, not sure if I have to do something about this. If yes, Pls, advise

  2. I'm ignoring the following as suggested by you
    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/create-react-context/node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView node_modules/create-react-context/node_modules/fbjs/lib/UserAgent.js: * - UIWebView node_modules/fbjs/lib/UserAgent.js.flow: * - UIWebView node_modules/fbjs/lib/UserAgent.js: * - UIWebView

  3. At the moment I'm sticking on with react-native - 0.59.10 and not fully upgrading except for react-native-webview and reaft-native-device-info as I mentioned earlier. So, in that case, is the only solution available is to remove its usage via post_install scripts? Pls, advise.

  4. I suppose I can ignore the react-native-charts-wrapper as I see this as a comment

  5. The rest are all related to the usages of Webview under the node_modules/react-native/React/Views/RCTWebView.m: for which I've upgraded the react-native-web-view to 7.0.1. I suppose it should take care of the issue. Unsure if I need to upgrade to the latest or something. Please advise

  6. Also, I noticed this while calling the WebView, there is no explicit use {useWebKit=true}. Do I need to inject {useWebkit=true} to opt into WKWebview. Pls, advise.

@lgenzelis
Copy link

lgenzelis commented Mar 22, 2020

Hi @Brad19 . I can answer some of your questions:

  • The post script fix suggested by @mptorz was the only thing that worked for me (using react native 0.59)

react_project = Xcodeproj::Project.open("../node_modules/react-native/React/React.xcodeproj")
react_project.main_group["React/Views"].files.each do |file|
if file.path.match(/^RCTWebView/)
file.remove_from_project
end
end
react_project.save

  • I didn't write {useWebkit=true} anywhere in my code

  • react-native-web-view to 7.0.1 was enough for me

@Brad19
Copy link

Brad19 commented Mar 22, 2020

Thanks @lgenzelis . I'll try including the scripts in podfile and build it again to create a TestFlight build. Hope it works!!!

@Abhishek-Sankey
Copy link

@HiralBarot1512
Do you use cocoapods? We put something like that in our Podfile's post_install

react_project = Xcodeproj::Project.open("../node_modules/react-native/React/React.xcodeproj")
    react_project.main_group["React/Views"].files.each do |file|   
      if file.path.match(/^RCTWebView/) 
        file.remove_from_project
      end   
    end   
react_project.save

We also removed or upgraded all packages that were using this deprecated Webview (like for example react-native-device-info.

i am not able to find React.xcodeproj, may be because of higher react-native version(0.61). Any solution that might help?

@Brad19
Copy link

Brad19 commented Apr 3, 2020

@fahadhaquni
Pls use the following in post_install in podfile and i'm sure it should work as this will delete the old files which had deprecated references.

react_project = Xcodeproj::Project.open("../node_modules/react-native/React/React.xcodeproj")
react_project.main_group["React/Views"].files.each do |file|
if file.path.match(/^RCTWebView/)
file.remove_from_project
end
end
react_project.save

@tmaly1980
Copy link

tmaly1980 commented Apr 13, 2020

I'm unfortunately seeing this on 0.61.5, I'm not using WebView at all, and I've grepped both ios/Pods and node_modules for UIWebView and RCTWebView (as well as searching for files named after that) to no success. I have no idea where this warning is coming from.

@cinnabarcaracal
Copy link

Following instructions above, I looked into adding a post_install step to my Pods file. When I looked at the path in the given code, I couldn't find React.xcodeproj. I assume it went away as part of the refactoring that went into react-native 0.61.X + (maybe even earlier).

Next I tried searching my node_modules for the string UIWebView:

grep -r UIWebView node_modules/* but the on closer inspection most of them were comments or lines in changelogs.

I expanded my search to the entire project, and came up with some hits in my Pods directory:

[redacted]$ grep -r UIWebView ./*
# (comments/changelogs/android code removed)...
Binary file ./ios/Pods/FirebaseMLCommon/Frameworks/FirebaseMLCommon.framework/FirebaseMLCommon matches
Binary file ./ios/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics matches
Binary file ./ios/Pods/Fabric/upload-symbols matches
# ...

This pointed strongly towards our firebase dependencies being the culprit (Fabric is used by firebase). I googled for firebase+UIWebView and found a GH Issue suggesting it was a known/fixed issue. I upgraded the three firebase dependencies we have using:

yarn upgrade @react-native-firebase/app @react-native-firebase/analytics @react-native-firebase/crashlytics

cd ios

rm -rf Pods # probably not needed
pod install

Built my project, tested everything was still working and submitted to Apple. This time there was no message about using a depreciated API.

@barak109
Copy link

For those who can't update above RN 0.60 i run this command and it's solve the problem in react native package:

local dir="${BASE_DIR}/node_modules/react-native/React";
sed -i'.bak' '/RCTWebView/d' "${dir}/React.xcodeproj/project.pbxproj"
rm -f "${dir}/React.xcodeproj/project.pbxproj.bak"
rm -f "${dir}/Views/RCTWebView.m"
rm -f "${dir}/Views/RCTWebView.h"
rm -f "${dir}/Views/RCTWebViewManager.m"
rm -f "${dir}/Views/RCTWebViewManager.h"

Credit To -
https://medium.com/@ivanpagac_5657/how-to-solve-itms-90809-deprecated-api-usage-with-reactnative-0-60-in-ci-pipeline-132ca60dcf60

@MrAlekhin
Copy link

@barak109 that's a good catch. This is a dirty way but it works 👍
small description to make it easy to implement

  • create removeWebView.sh file in your root folder
  • inside removeWebView.sh past this code:
#!/bin/bash
BASE_DIR=`pwd`;
function remove_rctwebview(){
    
    local dir="${BASE_DIR}/node_modules/react-native/React";

    sed -i'.bak' '/RCTWebView/d' "${dir}/React.xcodeproj/project.pbxproj"
    rm -f "${dir}/React.xcodeproj/project.pbxproj.bak"
    rm -f "${dir}/Views/RCTWebView.m"
    rm -f "${dir}/Views/RCTWebView.h"
    rm -f "${dir}/Views/RCTWebViewManager.m"
    rm -f "${dir}/Views/RCTWebViewManager.h"
}

remove_rctwebview;
  • in your terminal execute chmod 777 removeWebView.sh
  • and then sudo ./removeWebView.sh
  • check if files have been removed from /node_modules/react-native/React

@vjsingh96
Copy link

Does anybody has resolved this issue? specially @fahadhaquni

@faraznaqvi99
Copy link

@AtranDev Maybe try grep -r UIWebView node_modules/*

Try this where exactly?

@Biplovkumar
Copy link

my app not accepting by testflight.
By this reson.
plz help. i am stuck from 10 days.
i have tried all soolutions.

@Brad19
Copy link

Brad19 commented May 17, 2020

@Biplovkumar
What is the error do you get. Could you please explain what did you try and what do you get now?

  • Did you check grep -r UIWebView node_modules/*
  • Did you use react-native-gesture-handler or reaft-native-device-info or any other
  • Any other peer dependencies?
    Please explain to get more clarity for others.

@hengkx
Copy link

hengkx commented May 21, 2020

same problem.react native 0.62

@lluis-sancho
Copy link

I solved my problem, after upgrading from 0.59.10 to 0.61.3.. which even after upgrading react-native-fbsdk i was not able to publish the app.

The steps i have followed in order to solve it:

1) Upgrade the package to react-native-fbsdk": "^2.0.0",
2) Added to pod:

  • pod 'FBSDKCoreKit'
  • pod 'FBSDKLoginKit'
  • pod 'FBSDKShareKit'
  • pod 'FBSDKPlacesKit'

3) Removed from framework folder the old facebook frameworks:

  • ios/Frameworks/FBSDKCoreKit.framework/Headers/FBSDKAccessToken.h
  • ios/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit
  • ... all FBSDKXXXX

4) Removed also from Xcode in frameworks folder

5) cd ios - pod install

6) Archive and uploaded to apple.

@peymancyb
Copy link

I am facing the same issue, while using react-native-fbsdk: 2.0.0,
Can you help me to fix this issue?

@charkour
Copy link

Just got the same email, I'm guessing it might be expo related? Because I'm otherwise doing pretty vanilla stuff on top of expo

@rcchen This reply is a bit late, but ExpoSDK > 36.0.0 uses UIWebView which will cause the bug. Upgrading to 36.0.0 or higher should fix it.

@rakeshostwal
Copy link

I was also facing the same issue, the trick was to upgrade react-native-gesture-handler and removing the Facebook SDK and bolts framework references from ios/Frameworks as Pod installs them in the Pods anyway.

@kemalony
Copy link

killed my hours ,
in xcode searched uiwebview then made the changes below on FIRAuth* files
//webView.webView.delegate = self; UIWEBView -> WKWebView UIWebViewDelegate -> WKNavigationDelegate

@undigitals
Copy link

@rakeshostwal I'm having the same issue, I have updated the react-native-gesture-handler, can you explain more to delete the fbsdk and bolts framework ?

@undigitals
Copy link

@kemalony did you just comment the line? and how did you find the FIRAuth* files. I'm having the same issue.

@7laria
Copy link

7laria commented Jul 14, 2020

same issue but i'm using both WebView from react-native and from react-native-webview.
"react-native": "0.60.5",
"react-native-webview": "^9.4.0"
"react-native-fbsdk": "^1.0.4",

@oli-laban
Copy link

For those who can't update above RN 0.60 i run this command and it's solve the problem in react native package:

local dir="${BASE_DIR}/node_modules/react-native/React";
sed -i'.bak' '/RCTWebView/d' "${dir}/React.xcodeproj/project.pbxproj"
rm -f "${dir}/React.xcodeproj/project.pbxproj.bak"
rm -f "${dir}/Views/RCTWebView.m"
rm -f "${dir}/Views/RCTWebView.h"
rm -f "${dir}/Views/RCTWebViewManager.m"
rm -f "${dir}/Views/RCTWebViewManager.h"

Credit To -
https://medium.com/@ivanpagac_5657/how-to-solve-itms-90809-deprecated-api-usage-with-reactnative-0-60-in-ci-pipeline-132ca60dcf60

Using CocoaPods (in 0.59.10), as well as running the above I also had to:

  • Remove the following lines from ios/Pods/Target Support Files/React/React-umbrella.h:
#import "RCTWebView.h"
#import "RCTWebViewManager.h"
  • Go to the React target of the Pods project and remove references to RCTWebView and RCTWebViewManager in Build Phases -> Headers (Public & Private).

@carloscuesta
Copy link
Contributor

carloscuesta commented Jul 27, 2020

In my particular case on an application that is using react-native 0.59.10 I made the following steps to solve the issue:

Steps to fix the issue on React-Native 0.59.X

Upgrade dependencies

Make sure all the dependencies are not using UIWebView. If you find a dependency that is using UIWebView find the update that removes it.

To check this you'll have to look on node_modules and ios project folder with the following commands:

$ grep -r UIWebView node_modules/*
$ cd ios/ && grep -r UIWebView .

Ignore the UIWebView references from node_modules/react-native because I'm going to explain later how to remove those references. Make sure that both commands does not returns real code that is using UIWebView. You may find matches on comments but those doesn't matter.

⚠️ In case you're using react-native-webview you'll find that on react-native@0.59.X you are not able to use the release that contains the removal of this component because it requires react-native version bigger than 0.60.x (due to AndroidX support).

You should use jettifier on reverse mode to patch the dependency and convert it to Android Support Library on install time. After that you'll be able to upgrade this dependency and make it work on Android build.

Remove UIWebView references from react-native core

Ensure that all the WebViews you're using on your react codebase are imported from react-native-webview and not react-native.

Once you don't have any dependency that is using UIWebView internally. You'll need to remove the UIWebView from the react-native core. Why ? You might wonder, because this removal was done on the 0.60 release. To do that I implemented the following solution as an npm postinstall script since I'm not using CocoaPods for the moment.

ios/removeUIWebView.rb

require 'xcodeproj'

# This script removes UIWebView from React project.
# We should remove this script once we upgrade react-native to 0.60.x
react_project = Xcodeproj::Project.open("./node_modules/react-native/React/React.xcodeproj")

react_project.main_group["React/Views"].files.each do |file|
  if file.path.match(/^RCTWebView/)
    file.remove_from_project
  end
end

react_project.save

puts '> ✅ UIWebView removed successfully from React.xcodeproj'

package.json

"scripts": {
  "postinstall": "npx jetifier -r && ruby ios/removeUIWebView.rb
}

This step is not required once you upgrade to react-native > 0.60. Because this is already done on the native iOS library.

Upgrading to react-native 0.6X does not solves the problem if there are dependencies using UIWebView

This is an important concept. If you still have dependencies that are using the deprecated WebView you'll find the same warning even though you upgraded your react-native version.

List of conflicting libraries

From all my dependencies these ones had a UIWebView reference to it:

  • react-native-fbsdk: I had a Bolts.framework linked from the first time I was using the library and it's not needed anymore on fbsdk-ios v5. Also starting from v5 UIWebView has been removed from the SDK. Reference from the maintainer

  • react-native-firebase-sdk: Upgrade the firebase-ios-sdk to the latest version 6.28. If you are below 6.8.1 you should upgrade at least to 6.9.0. Reference from the release notes.

After doing this I'm not receiving anymore the following warning:

ITMS-90809: Deprecated API Usage - App updates that use UIWebView will no longer be accepted as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

💪🏼 Thanks to everyone on this issue for helping, I hope this comment could help someone ❤️ 👏🏼

@ahmedezzatGcs
Copy link

@barak109 that's a good catch. This is a dirty way but it works 👍
small description to make it easy to implement

  • create removeWebView.sh file in your root folder
  • inside removeWebView.sh past this code:
#!/bin/bash
BASE_DIR=`pwd`;
function remove_rctwebview(){
    
    local dir="${BASE_DIR}/node_modules/react-native/React";

    sed -i'.bak' '/RCTWebView/d' "${dir}/React.xcodeproj/project.pbxproj"
    rm -f "${dir}/React.xcodeproj/project.pbxproj.bak"
    rm -f "${dir}/Views/RCTWebView.m"
    rm -f "${dir}/Views/RCTWebView.h"
    rm -f "${dir}/Views/RCTWebViewManager.m"
    rm -f "${dir}/Views/RCTWebViewManager.h"
}

remove_rctwebview;
  • in your terminal execute chmod 777 removeWebView.sh
  • and then sudo ./removeWebView.sh
  • check if files have been removed from /node_modules/react-native/React

It worked fine. When I execute command "grep -r UIWebView ." inside node module path nothing exists, but inside the project I found too many binary files inside ./ios/Build matches . Finally got the same mail from app store " UIWebView are no longer accepted".
Any solution, please ?

@jeremiahlachica
Copy link

jeremiahlachica commented Nov 18, 2020

Still got the same error. Apple no longer accept builds with UIWebView reference.
I tried adding post install script to remove references to UIWebView, RCTWebView. I also upgraded react-native-webview to 7.5.2 (also tried 10.0.0) but nothing worked for me. The project I'm working on is currently using RN 0.59.8.

Also ran: grep -r UIWebView node_modules/* and here's what I got:
Screen Shot 2020-11-15 at 5 24 03 PM

Tried to removing the ff:

  • react-native-instagram-login
  • react-native-reanimated
  • react-native-web

Nothing worked as well.

We are also attempting to upgrade to higher SDK version but having errors and it's kinda complicated to do so.

Is there anything else we need to do? Please help. Thanks.

@rodrigooler
Copy link

Hello everyone, I looked at this issue but I couldn't solve my problem.

My problem is the same as reported above -> 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).

Package.json from my current project

{
  "name": "app1",
  "version": "0.0.1",
  "dependencies": {
    "axios": "^0.18.0",
    "axios-extensions": "^3.0.5",
    "babel-eslint": "^10.0.1",
    "boleto-validator": "^1.0.2",
    "color": "^3.1.2",
    "graceful-fs": "^4.2.4",
    "lodash": "^4.17.11",
    "moment": "^2.24.0",
    "react": "16.8.3",
    "react-native": "0.59.10",
    "react-native-android-open-settings": "^1.2.0",
    "react-native-animatable": "^1.3.0",
    "react-native-camera": "^1.6.4",
    "react-native-carousel-control": "^2.0.1",
    "react-native-circular-progress": "^1.1.0",
    "react-native-contacts": "^3.1.4",
    "react-native-custom-qr-codes": "^2.0.0",
    "react-native-datepicker": "^1.7.2",
    "react-native-device-info": "^7.1.0",
    "react-native-elements": "^0.19.1",
    "react-native-elevated-view": "0.0.6",
    "react-native-fast-image": "^5.1.2",
    "react-native-fingerprint-scanner": "^2.5.0",
    "react-native-firebase": "^5.2.3",
    "react-native-flexi-radio-button": "^0.2.2",
    "react-native-gesture-handler": "^1.2.1",
    "react-native-image-resizer": "^1.0.0",
    "react-native-keychain": "^3.0.0",
    "react-native-masked-text": "^1.9.2",
    "react-native-modal": "^7.0.2",
    "react-native-modal-datetime-picker": "^6.0.0",
    "react-native-motion": "^0.2.0",
    "react-native-navbar": "^2.1.0",
    "react-native-orientation": "^3.1.3",
    "react-native-orientation-locker": "^1.1.1",
    "react-native-pdf": "^5.0.11",
    "react-native-permissions": "^1.1.1",
    "react-native-picker-select": "^5.2.4",
    "react-native-progress": "^3.5.0",
    "react-native-public-ip": "^1.0.1",
    "react-native-push-notification": "^3.1.2",
    "react-native-qrcode-scanner": "^1.1.2",
    "react-native-qrcode-svg": "^5.1.1",
    "react-native-responsive-screen": "^1.2.0",
    "react-native-router-flux": "^4.0.6",
    "react-native-search-filter": "^0.1.4",
    "react-native-shadow": "^1.2.2",
    "react-native-share": "^1.1.3",
    "react-native-snap-carousel": "^3.7.5",
    "react-native-svg": "^9.3.3",
    "react-native-svg-uri": "^1.2.3",
    "react-native-swipe-gestures": "^1.0.3",
    "react-native-transition": "^1.1.8",
    "react-native-ui-xg": "0.0.6",
    "react-native-vector-icons": "^6.1.0",
    "react-native-voice": "^0.2.6",
    "react-native-webview": "^10.10.2",
    "react-number-format": "^4.0.6",
    "react-redux": "^6.0.0",
    "redux": "^4.0.1",
    "redux-thunk": "^2.3.0",
    "reselect": "^4.0.0",
    "rn-fetch-blob": "0.10.15",
    "rn-viewpager": "^1.2.9",
    "standard": "^12.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.4.5",
    "@babel/runtime": "^7.4.5",
    "babel-jest": "^24.8.0",
    "jest": "^24.8.0",
    "metro-react-native-babel-preset": "^0.54.1",
    "react-test-renderer": "16.8.3",
    "reactotron-react-native": "^3.2.1",
    "reactotron-redux": "^3.1.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true,
  "rnpm": {
    "assets": [
      "./src/assets/fonts/"
    ]
  },
  "scripts": {
    "android": "react-native run-android",
    "port:kill": "kill -9 $(lsof -t -i:8081)",
    "android:apk": "cd android && ./gradlew assembleRelease && cd .. && yarn copy:apk",
    "copy:apk": "cp android/app/build/outputs/apk/release/app-x86-release.apk se-wallet.apk",
    "clean-cache": "react-native start --reset-cache",
    "emulate": "cd %USERPROFILE%/AppData/Local/Android/Sdk/emulator && emulator @Nexus",
    "maxUserWatches": "echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p",
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "standard"
  },
  "standard": {
    "parser": "babel-eslint",
    "globals": [
      "describe",
      "test",
      "jest",
      "expect",
      "fetch",
      "navigator",
      "__DEV__",
      "XMLHttpRequest",
      "FormData",
      "React$Element"
    ]
  }
}

I did the process of running the script below

#!/bin/bash
BASE_DIR=`pwd`;
function remove_rctwebview(){
    
    local dir="${BASE_DIR}/node_modules/react-native/React";

    sed -i'.bak' '/RCTWebView/d' "${dir}/React.xcodeproj/project.pbxproj"
    rm -f "${dir}/React.xcodeproj/project.pbxproj.bak"
    rm -f "${dir}/Views/RCTWebView.m"
    rm -f "${dir}/Views/RCTWebView.h"
    rm -f "${dir}/Views/RCTWebViewManager.m"
    rm -f "${dir}/Views/RCTWebViewManager.h"
}

remove_rctwebview;

I also run the following command on the terminal

❯ grep -r UIWebView node_modules/*                         
node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/fbjs/lib/UserAgent.js.flow:   * - 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/metro/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/metro/node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/react-native/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/react-native/node_modules/fbjs/lib/UserAgent.js.flow:   * - 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",

But even after doing all the processes I still can't publish in the store. Has anyone managed to solve or have a tip? Remembering that I have already placed all WebViews in react-native-webview and also with useWebKit = {true}

@jeremiahlachica
Copy link

jeremiahlachica commented Nov 19, 2020

Still got the same error. Apple no longer accept builds with UIWebView reference.
I tried adding post install script to remove references to UIWebView, RCTWebView. I also upgraded react-native-webview to 7.5.2 (also tried 10.0.0) but nothing worked for me. The project I'm working on is currently using RN 0.59.8.

Also ran: grep -r UIWebView node_modules/* and here's what I got:
Screen Shot 2020-11-15 at 5 24 03 PM

Tried to removing the ff:

  • react-native-instagram-login
  • react-native-reanimated
  • react-native-web

Nothing worked as well.

We are also attempting to upgrade to higher SDK version but having errors and it's kinda complicated to do so.

Is there anything else we need to do? Please help. Thanks.

Updates:
We did check the Pods and UIWebView still exists in Crashlytics and FBAudienceNetwork as part of/dependencies of ExpoKit 2.13.0.

Aside from doing the post install script, what we did is to upgrade Crashlytics from 3.13.4 to 3.14.0 and FBAudienceNetwork to 5.5.0 to 5.6.0.

I did fork Expo repository and upgraded the versions for Crashlytics and FBAudienceNetwork. Check it here.

Solution for my case:

  • Upgraded react-native-webview to >= 7.0.1
  • If you're using ExpoKit 2.13.0, replace this block:
pod 'ExpoKit',
    :git => "http://github.com/expo/expo.git",
    :tag => "ios/2.13.0",
    :subspecs => [
      "Core"
    ],
    :inhibit_warnings => true

To

pod 'ExpoKit',
    :git => "http://github.com/jeremiahlachica/expo.git",
    :tag => "ios/2.13.1.0",
    :subspecs => [
      "Core"
    ],
    :inhibit_warnings => true
  • Delete Podfile.lock
  • Delete Pods folder
  • In the terminal: pod install
  • I also tried adding post install script to delete references to UIWebView / RCTWebView

I hope this will help someone.

@gidhin
Copy link

gidhin commented Jul 14, 2021

ITMS-90809: Deprecated API Usage** - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (Apple Developer Documentation).

Package.json

“dependencies”: {
“@angular/common”: “~8.1.2”,
“@angular/compiler”: “~8.1.2”,
“@angular/core”: “~8.1.2”,
“@angular/forms”: “~8.1.2”,
“@angular/platform-browser”: “~8.1.2”,
“@angular/platform-browser-dynamic”: “~8.1.2”,
“@angular/router”: “~8.1.2”,
“@ionic-native/app-version”: “^5.27.0”,
“@ionic-native/core”: “^5.14.0”,
“@ionic-native/geolocation”: “^5.14.0”,
“@ionic-native/ionic-webview”: “^5.34.0”,
“@ionic-native/native-geocoder”: “^5.14.0”,
“@ionic-native/onesignal”: “^5.18.0”,
“@ionic-native/paypal”: “^5.28.0”,
“@ionic-native/photo-viewer”: “^5.29.0”,
“@ionic-native/sms-retriever”: “^5.27.0”,
“@ionic-native/splash-screen”: “^5.0.0”,
“@ionic-native/status-bar”: “^5.0.0”,
“@ionic-native/stripe”: “^5.28.0”,
“@ionic/angular”: “^4.7.1”,
“card.io.cordova.mobilesdk”: “^2.1.0”,
“com.paypal.cordova.mobilesdk”: “^3.5.0”,
“com.razorpay.cordova”: “^1.4.9”,
“cordova-browser”: “^5.0.4”,
“cordova-plugin-add-swift-support”: “2.0.2”,
“cordova-plugin-app-version”: “^0.1.9”,
“cordova-plugin-cocoapod-support”: “^1.6.2”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-geolocation”: “^4.0.2”,
“cordova-plugin-ionic-keyboard”: “^2.2.0”,
“cordova-plugin-nativegeocoder”: “^3.2.2”,
“cordova-plugin-sms-retriever-manager”: “^1.0.2”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “^2.4.2”,
“cordova-plugin-stripe”: “^1.5.3”,
“cordova-plugin-whitelist”: “^1.3.3”,
“core-js”: “^2.5.4”,
“onesignal-cordova-plugin”: “2.8.0”,
“rxjs”: “~6.5.1”,
“rxjs-compat”: “^6.5.4”,
“tslib”: “^1.9.0”,
“zone.js”: “~0.9.1”
},
“devDependencies”: {
“@angular-devkit/architect”: “~0.801.2”,
“@angular-devkit/build-angular”: “~0.801.2”,
“@angular-devkit/core”: “~8.1.2”,
“@angular-devkit/schematics”: “~8.1.2”,
“@angular/cli”: “~8.1.2”,
“@angular/compiler”: “~8.1.2”,
“@angular/compiler-cli”: “~8.1.2”,
“@angular/language-service”: “~8.1.2”,
“@ionic/angular-toolkit”: “~2.0.0”,
“@ionic/lab”: “2.0.11”,
“@types/jasmine”: “~3.3.8”,
“@types/jasminewd2”: “~2.0.3”,
“@types/node”: “~8.9.4”,
“codelyzer”: “^5.0.0”,
“com-sarriaroman-photoviewer”: “^1.2.5”,
“cordova-android”: “^7.1.4”,
“cordova-ios”: “^5.1.1”,
“cordova-plugin-ionic-webview”: “^5.0.0”,
“jasmine-core”: “~3.4.0”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~4.1.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.1”,
“karma-jasmine”: “~2.0.1”,
“karma-jasmine-html-reporter”: “^1.4.0”,
“protractor”: “~5.4.0”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.15.0”,
“typescript”: “~3.4.3”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-nativegeocoder”: {
“LOCATION_WHEN_IN_USE_DESCRIPTION”: “Use geocoder service”
},
“cordova-plugin-sms-retriever-manager”: {
“PLAY_SERVICES_VERSION”: “15.0.1”
},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-app-version”: {},
“cordova-plugin-geolocation”: {
“GEOLOCATION_USAGE_DESCRIPTION”: “We need your location for display nearest store.”,
“GPS_REQUIRED”: “true”
},
“com.razorpay.cordova”: {},
“com.paypal.cordova.mobilesdk”: {},
“cordova-plugin-stripe”: {},
“com-sarriaroman-photoviewer”: {}
},
“platforms”: [
“android”,
“browser”,
“ios”
]

Config.xml

We use your location for full functionality of certain app features.
Please help me out. I’m looking for 1 month but not a get solution.

Thanks.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 4, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: WebView Related to the WebView component. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests