Closed imbudhiraja closed 5 years ago
If you're using react-native-webview
@imbudhiraja, take a look at:
https://github.com/react-native-community/react-native-webview/issues/312
We've received the same warning and are not using any webview
I've made the same mistake. Is there a solution? I didn't use react-native-webview
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
more information here: https://github.com/react-native-community/react-native-webview/issues/819
@maxwell2022 @Yathousen no I'm not using react-native-webview
@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.
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)
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"
@ATranDev Maybe try grep -r UIWebView node_modules/*
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!
@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.
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.
@mptorz I love you man! Those lines were a life saver 😄
We put something like that in our Podfile's post_install
We tried @mptorz's post_install script, but we're still receiving the same warning, any updates on this?
@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.
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.
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:
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
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
@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
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
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
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.
I suppose I can ignore the react-native-charts-wrapper as I see this as a comment
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
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.
Hi @Brad19 . I can answer some of your questions:
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
Thanks @lgenzelis . I'll try including the scripts in podfile and build it again to create a TestFlight build. Hope it works!!!
@Brad19 Can you make it work?
@mptorz Can you share some example of your pod file? Thank you.
@ducpt2 The solution that worked finally was removing the RCTWebView. It's not only important to upgrade the ReactNative Webview version, but also remove the old file where it has its reference. Just follow this - https://medium.com/@NumberShapes/uiwebview-app-store-submission-kickback-issue-bb07d77a902. I suppose it should work. If not, Pls check your references.
I have tried everything I can find on the web.
I have ran the
grep -r UIWebView node_modules/*
I currently get the following output
Binary file node_modules/react-native-device-info/RNDeviceInfo.xcodeproj/project.xcworkspace/xcuserdata/fahadhaque.xcuserdatad/UserInterfaceState.xcuserstate matches
node_modules/fbjs/lib/UserAgent.js: * - UIWebView
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",
I am still getting the deprecated warning error when I upload to itunesconnect.
Can some one please help. Thanks in advance.
@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?
@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
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.
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.
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"
@barak109 that's a good catch. This is a dirty way but it works 👍 small description to make it easy to implement
removeWebView.sh
file in your root folderinside 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_
Does anybody has resolved this issue? specially @fahadhaquni
@AtranDev Maybe try
grep -r UIWebView node_modules/*
Try this where exactly?
my app not accepting by testflight. By this reson. plz help. i am stuck from 10 days. i have tried all soolutions.
@Biplovkumar What is the error do you get. Could you please explain what did you try and what do you get now?
same problem.react native 0.62
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:
3) Removed from framework folder the old facebook frameworks:
4) Removed also from Xcode in frameworks folder
5) cd ios - pod install
6) Archive and uploaded to apple.
I am facing the same issue, while using react-native-fbsdk: 2.0.0, Can you help me to fix this issue?
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.
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.
killed my hours ,
in xcode searched uiwebview then made the changes below on FIRAuth* files
//webView.webView.delegate = self; UIWEBView -> WKWebView UIWebViewDelegate -> WKNavigationDelegate
@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 ?
@kemalony did you just comment the line? and how did you find the FIRAuth* files
. I'm having the same issue.
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",
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"
Using CocoaPods (in 0.59.10), as well as running the above I also had to:
ios/Pods/Target Support Files/React/React-umbrella.h
:
#import "RCTWebView.h"
#import "RCTWebViewManager.h"
RCTWebView
and RCTWebViewManager
in Build Phases -> Headers (Public & Private).In my particular case on an application that is using react-native
0.59.10
I made the following steps to solve the issue:
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.
:warning: 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.
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.
react-native
0.6X
does not solves the problem if there are dependencies using UIWebViewThis 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.
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 ❤️ 👏🏼
@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 _/nodemodules/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 ?
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:
Tried to removing the ff:
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.
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}
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: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:
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
pod install
I hope this will help someone.
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.