Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.7k views
in Technique[技术] by (71.8m points)

ios - ITMS-90809: Deprecated API Usage when i use react-native-webview

i'm using react-native-webview but when i publish the app to Testflight it send me :

App Store Connect

Dear Developer,

We identified one or more issues with a recent delivery for your app, "AlBiddaPark" 1.2.19 (37). Please correct the following issues, then upload again.

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).

Best regards,

The App Store Team

How can i solve this problem ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

1- Run in root folder screen command grep -r UIWebView node_modules/* t

2- Check dependencies which need updated, excluding:

node_modules/react-native

node_modules/metro

node_modules/fbjs

Update all external dependencies

4- Replace all WebView what used default react native. Replace it on https://github.com/react-native-community/react-native-webview

5- Added script into Podfile

post_install do |installer|
 # REMOVE ALL WEB VIEWS
 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
 end

6- Run pod install command, and you are done


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...