不推荐使用的API用法Expo React Native

问题描述 投票:0回答:1

我有一个Expo RN应用程序,我上个月能够成功上传到TestFlight,但由于AppStore的UIWebView版本贬值,现在被拒绝了。我删除了UIWebView的所有引用,清除了缓存,刷新了package-lock.json,甚至用grep -r "UIWebView" .命令强制删除了所有引用。什么都没用。每次我使用Expo重建iOs应用程序,然后将其上传到TestFlight时,构建都会失败并抛出此无用的一般错误:This build is invalid.

我收到一封电子邮件,其中包含以下稍微有用的消息:

TMS-90809:不建议使用的API使用-使用UIWebView的新应用没有不再接受。相反,使用WKWebView可以提高安全性,可靠性。了解更多

[我发现有一篇文章说我需要将expo SDK版本更新为37,但是当我这样做时,我的应用程序会中断,因为我使用的是旧版React Native版本(v 0.59),并且它们不兼容。

我真的很讨厌拆开我的应用程序,更新RN版本,更新expo SDK版本以仅使错误持续存在。

是否有一种方法可以在App Store Connect上获取我的应用程序,而不必在我的app.json中更新我的RN和expo SDK版本?

docs我已经浏览过:ITMS-90809: Deprecated API Usage -- Apple will stop accepting submissions of apps that use UIWebView APIshttps://developer.apple.com/documentation/uikit/uiwebview

app.json

{
"expo": {
"name": "companyname",
"slug": "companyname",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": ["ios", "android", "web"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/logo.png",
"splash": {
  "image": "./assets/logo_original.png",
  "resizeMode": "contain",
  "backgroundColor": "#ffffff"
},
"updates": {
  "fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
  "supportsTablet": true,
  "bundleIdentifier": "com.companyname.companyname",
  "buildNumber": "9.0.8"
},
"android": {
  "package": "com.companyname.companyname",
  "versionCode": 2.0,
  "config": {
    "googleMaps": {
      "apiKey": "123"
    }
  },
  "permissions": [
    "ACCESS_COARSE_LOCATION",
    "ACCESS_FINE_LOCATION",
    "CAMERA",
    "MANAGE_DOCUMENTS",
    "READ_CONTACTS",
    "READ_CALENDAR",
    "WRITE_CALENDAR",
    "READ_EXTERNAL_STORAGE",
    "READ_PHONE_STATE",
    "RECORD_AUDIO",
    "USE_FINGERPRINT",
    "VIBRATE",
    "WAKE_LOCK",
    "WRITE_EXTERNAL_STORAGE",
    "com.anddoes.launcher.permission.UPDATE_COUNT",
    "com.android.launcher.permission.INSTALL_SHORTCUT",
    "com.google.android.c2dm.permission.RECEIVE",
    "com.google.android.gms.permission.ACTIVITY_RECOGNITION",
    "com.google.android.providers.gsf.permission.READ_GSERVICES",
    "com.htc.launcher.permission.READ_SETTINGS",
    "com.htc.launcher.permission.UPDATE_SHORTCUT",
    "com.majeur.launcher.permission.UPDATE_BADGE",
    "com.sec.android.provider.badge.permission.READ",
    "com.sec.android.provider.badge.permission.WRITE",
    "com.sonyericsson.home.permission.BROADCAST_BADGE"
  ]
}
}
}

package.json

{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest",
"postinstall": "node overwrite/migrate.js"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"@ptomasroos/react-native-multi-slider": "^2.0.0",
"@react-native-community/datetimepicker": "^2.2.3",
"@shoutem/ui": "^1.0.4",
"add": "^2.0.6",
"expo": "35.0.0",
"expo-cli": "^3.20.3",
"expo-constants": "^8.0.0",
"expo-device": "^2.0.0",
"expo-file-system": "^7.0.0",
"expo-image-picker": "^7.0.0",
"expo-linear-gradient": "^7.0.1",
"expo-location": "^5.0.1",
"expo-permissions": "^5.0.1",
"faker": "^4.1.0",
"firebase": "~7.0.0",
"firebase-admin": "^8.10.0",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "0.59.8",
"react-native-animatable": "^1.3.3",
"react-native-app-intro-slider": "^3.0.0",
"react-native-collapsible": "^1.5.1",
"react-native-datepicker": "^1.7.2",
"react-native-deck-swiper": "^1.6.7",
"react-native-device-info": "^5.5.3",
"react-native-draggable-flatlist": "^1.1.9",
"react-native-elements": "^1.2.6",
"react-native-flash-message": "^0.1.15",
"react-native-gesture-handler": "^1.2.2",
"react-native-gifted-chat": "^0.12.0-beta-0",
"react-native-google-places": "^3.1.2",
"react-native-google-places-autocomplete": "^1.3.9",
"react-native-image-slider-show": "^1.0.3",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-maps": "0.24.2",
"react-native-multi-slider": "^0.3.6",
"react-native-picker-select": "^6.3.3",
"react-native-screens": "^2.5.0",
"react-native-swiper-flatlist": "^2.0.3",
"react-native-vector-icons": "^6.6.0",
"react-native-view-overflow": "0.0.4",
"react-native-web": "^0.11.4",
"react-navigation": "^3.13.0",
"redux": "^4.0.4"
},
"rnpm": {
"assets": [
  "utils/Fonts/"
]
},
"devDependencies": {
"babel-eslint": "^10.0.3",
"babel-plugin-module-resolver": "^3.2.0",
"babel-preset-expo": "^5.2.0",
"eslint": "^6.6.0",
"eslint-config-react": "^1.1.7",
"eslint-config-react-native": "^4.0.0",
"eslint-import-resolver-babel-module": "^5.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "0.0.0-f6b8d31a7",
"eslint-plugin-react-native": "^3.8.1",
"prettier": "^1.19.1"
},
"private": true
}
react-native uiwebview app-store-connect expo
1个回答
0
投票

您需要更新到SDK 37才能删除UIWebView上的所有依赖项。有关更多信息,请参见此博客文章,尤其是在“ UIWebView Removed”标题下。 https://blog.expo.io/expo-sdk-37-is-now-available-dd5770f066a6

© www.soinside.com 2019 - 2024. All rights reserved.