React Native v0.61.5 获取 ITMS-90809:弃用 API 用法
React Native v0.61.5 getting ITMS-90809: Depracated API Usage
我最后一次将我的应用程序部署到苹果商店是在 2020 年 2 月 18 日。当时我也收到了关于贬低的警告,但我忽略了它,因为那次他们仍然允许它。现在,我再次在 Apple Store 上传(2020 年 9 月 25 日),我再次收到警告,这次他们已经阻止了。所以现在我只需要以下方面的帮助:
- 我如何知道哪些包正在使用已弃用的 UIWebView?
- 我该如何处理那些使用 UIWebView 的包?
以下是一些信息:
电子邮件:
ITMS-90809:已弃用 API 用法 - 不再接受使用 UIWebView 的新应用程序。相反,使用 WKWebView 来提高安全性和可靠性。
react-native 信息:
System:
OS: macOS 10.15.6
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 91.77 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
package.json
{
"name": "GMobileApp",
"version": "0.0.1",
"private": true,
"rnpm": {
"assets": [
"./src/assets/fonts/"
]
},
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/art": "^1.1.2",
"@react-native-community/async-storage": "^1.7.1",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/netinfo": "^5.3.3",
"@react-native-community/push-notification-ios": "^1.0.3",
"@react-native-firebase/admob": "^6.2.0",
"@react-native-firebase/app": "^6.2.0",
"@react-native-firebase/crashlytics": "^6.2.0",
"@react-native-firebase/messaging": "^6.2.0",
"@segment/analytics-react-native": "^1.1.0",
"axios": "^0.19.0",
"babel-runtime": "^6.26.0",
"events": "^3.0.0",
"moment": "^2.24.0",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-android-keyboard-adjust": "^1.2.0",
"react-native-animated-linear-gradient": "^1.2.0",
"react-native-device-info": "^5.4.0",
"react-native-elements": "^1.2.7",
"react-native-fbsdk": "^1.1.1",
"react-native-gesture-handler": "^1.5.2",
"react-native-gifted-chat": "^0.12.0",
"react-native-indicator": "^1.2.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-location": "^2.5.0",
"react-native-map-link": "^2.7.0",
"react-native-maps": "0.26.1",
"react-native-modal-datetime-picker": "^7.6.1",
"react-native-portal": "^1.3.0",
"react-native-push-notification": "^3.1.9",
"react-native-reanimated": "^1.4.0",
"react-native-responsive-dimensions": "^3.0.0",
"react-native-responsive-screen": "^1.3.0",
"react-native-screens": "^2.0.0-alpha.15",
"react-native-simple-toast": "^1.0.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^9.13.3",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-stack": "^1.10.3",
"react-navigation-tabs": "^2.6.0",
"react-navigation-transitions": "^1.0.12",
"react-redux": "^7.1.3",
"redux": "^4.0.4",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"twilio-chat": "^3.3.3"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0"
},
"jest": {
"preset": "react-native"
}
}
您可以尝试在 node_modules
中搜索 UIWebView
grep -r UIWebView node_modules/*
或者你可以试试
grep -r RCTWebView node_modules/*
输出还将包含评论。所以你可以忽略它。以下是不包括注释的输出。
node_modules/react-native-fbsdk/js/FBShareDialog.js: * Displays the dialog in a UIWebView within the app.
Binary file node_modules/react-native-gifted-chat/node_modules/react-native-maps/.gradle/4.10.3/taskHistory/taskHistory.bin matches
Binary file node_modules/react-native-maps/.gradle/4.10.3/taskHistory/taskHistory.bin matches
从这里我看到以下 2 个模块可能正在使用 UIWebView
- react-native-gifted-chat
- react-native-maps
关于你问题的第二部分,你需要升级所有的依赖。它有可能会破坏代码。您可能需要更新代码以解决这些问题。
我最后一次将我的应用程序部署到苹果商店是在 2020 年 2 月 18 日。当时我也收到了关于贬低的警告,但我忽略了它,因为那次他们仍然允许它。现在,我再次在 Apple Store 上传(2020 年 9 月 25 日),我再次收到警告,这次他们已经阻止了。所以现在我只需要以下方面的帮助:
- 我如何知道哪些包正在使用已弃用的 UIWebView?
- 我该如何处理那些使用 UIWebView 的包?
以下是一些信息:
电子邮件:
ITMS-90809:已弃用 API 用法 - 不再接受使用 UIWebView 的新应用程序。相反,使用 WKWebView 来提高安全性和可靠性。
react-native 信息:
System:
OS: macOS 10.15.6
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 91.77 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
package.json
{
"name": "GMobileApp",
"version": "0.0.1",
"private": true,
"rnpm": {
"assets": [
"./src/assets/fonts/"
]
},
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/art": "^1.1.2",
"@react-native-community/async-storage": "^1.7.1",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/netinfo": "^5.3.3",
"@react-native-community/push-notification-ios": "^1.0.3",
"@react-native-firebase/admob": "^6.2.0",
"@react-native-firebase/app": "^6.2.0",
"@react-native-firebase/crashlytics": "^6.2.0",
"@react-native-firebase/messaging": "^6.2.0",
"@segment/analytics-react-native": "^1.1.0",
"axios": "^0.19.0",
"babel-runtime": "^6.26.0",
"events": "^3.0.0",
"moment": "^2.24.0",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-android-keyboard-adjust": "^1.2.0",
"react-native-animated-linear-gradient": "^1.2.0",
"react-native-device-info": "^5.4.0",
"react-native-elements": "^1.2.7",
"react-native-fbsdk": "^1.1.1",
"react-native-gesture-handler": "^1.5.2",
"react-native-gifted-chat": "^0.12.0",
"react-native-indicator": "^1.2.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-location": "^2.5.0",
"react-native-map-link": "^2.7.0",
"react-native-maps": "0.26.1",
"react-native-modal-datetime-picker": "^7.6.1",
"react-native-portal": "^1.3.0",
"react-native-push-notification": "^3.1.9",
"react-native-reanimated": "^1.4.0",
"react-native-responsive-dimensions": "^3.0.0",
"react-native-responsive-screen": "^1.3.0",
"react-native-screens": "^2.0.0-alpha.15",
"react-native-simple-toast": "^1.0.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^9.13.3",
"react-native-vector-icons": "^6.6.0",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-navigation-stack": "^1.10.3",
"react-navigation-tabs": "^2.6.0",
"react-navigation-transitions": "^1.0.12",
"react-redux": "^7.1.3",
"redux": "^4.0.4",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"twilio-chat": "^3.3.3"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0"
},
"jest": {
"preset": "react-native"
}
}
您可以尝试在 node_modules
中搜索 UIWebViewgrep -r UIWebView node_modules/*
或者你可以试试
grep -r RCTWebView node_modules/*
输出还将包含评论。所以你可以忽略它。以下是不包括注释的输出。
node_modules/react-native-fbsdk/js/FBShareDialog.js: * Displays the dialog in a UIWebView within the app.
Binary file node_modules/react-native-gifted-chat/node_modules/react-native-maps/.gradle/4.10.3/taskHistory/taskHistory.bin matches
Binary file node_modules/react-native-maps/.gradle/4.10.3/taskHistory/taskHistory.bin matches
从这里我看到以下 2 个模块可能正在使用 UIWebView
- react-native-gifted-chat
- react-native-maps
关于你问题的第二部分,你需要升级所有的依赖。它有可能会破坏代码。您可能需要更新代码以解决这些问题。