0
votes

I am working on an application started in April and refused by the app store.

I took over the project yesterday, I deleted platform ios and I installed the latest version (6.0)

https://cordova.apache.org/announcements/2020/06/01/cordova-ios-release-6.0.0.html

However, while version 6.0 is supposed to stop using UiWebView, I get this error message when I try to send the app to the Apple store connect

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

My package.json

{
  "name": "X",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "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-rate": "^5.26.0",
    "@ionic-native/badge": "^5.26.0",
    "@ionic-native/base64": "^5.26.0",
    "@ionic-native/calendar": "^5.26.0",
    "@ionic-native/call-number": "^5.26.0",
    "@ionic-native/camera": "^5.26.0",
    "@ionic-native/clipboard": "^5.26.0",
    "@ionic-native/core": "^5.26.0",
    "@ionic-native/crop": "^5.26.0",
    "@ionic-native/fcm": "^5.26.0",
    "@ionic-native/file": "^5.26.0",
    "@ionic-native/in-app-browser": "^5.26.0",
    "@ionic-native/launch-navigator": "^5.26.0",
    "@ionic-native/native-storage": "^5.26.0",
    "@ionic-native/network": "^5.26.0",
    "@ionic-native/photo-viewer": "^5.26.0",
    "@ionic-native/social-sharing": "^5.26.0",
    "@ionic-native/splash-screen": "^5.26.0",
    "@ionic-native/status-bar": "^5.26.0",
    "@ionic-native/stripe": "^5.26.0",
    "@ionic/angular": "^4.11.10",
    "aios": "0.2.3",
    "call-number": "1.0.1",
    "com-badrit-base64": "0.2.0",
    "com-sarriaroman-photoviewer": "1.2.5",
    "cordova-android": "7.1.4",
    "cordova-clipboard": "1.3.0",
    "cordova-ios": "^6.0.0",
    "cordova-plugin-actionsheet": "2.3.3",
    "cordova-plugin-apprate": "1.5.0",
    "cordova-plugin-badge": "0.8.8",
    "cordova-plugin-calendar": "5.1.5",
    "cordova-plugin-camera": "4.1.0",
    "cordova-plugin-crop": "0.4.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-dialogs": "2.0.2",
    "cordova-plugin-facebook4": "1.7.4",
    "cordova-plugin-fcm-with-dependecy-updated": "6.4.3",
    "cordova-plugin-file": "6.0.2",
    "cordova-plugin-inappbrowser": "git+https://github.com/apache/cordova-plugin-inappbrowser.git",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^5.0.0",
    "cordova-plugin-nativestorage": "2.3.2",
    "cordova-plugin-network-information": "2.0.2",
    "cordova-plugin-splashscreen": "^5.0.4",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-plugin-x-socialsharing": "5.6.8",
    "core-js": "^2.6.11",
    "es6-promise-plugin": "4.2.2",
    "firebase": "^6.6.2",
    "ngx-qrcode2": "0.0.9",
    "ngx-qrcode3": "^0.3.0",
    "ngx-stripe": "^7.4.4",
    "rxjs": "^6.5.5",
    "tslib": "^1.13.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "5.0.4",
    "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",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "^2.0.8",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.2.2",
    "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.5.4",
    "protractor": "^5.4.4",
    "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-camera": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "uk.co.workingedge.phonegap.plugin.launchnavigator": {
        "GOOGLE_API_KEY_FOR_ANDROID": "X",
        "OKHTTP_VERSION": "3.12.0",
        "LOCATION_USAGE_DESCRIPTION": "This app requires access to your location for navigation purposes"
      },
      "cordova-plugin-badge": {},
      "cordova-plugin-nativestorage": {},
      "cordova-clipboard": {},
      "com-badrit-base64": {},
      "cordova-plugin-file": {},
      "cordova-plugin-calendar": {
        "CALENDAR_USAGE_DESCRIPTION": " ",
        "CONTACTS_USAGE_DESCRIPTION": " "
      },
      "cordova-plugin-facebook4": {
        "APP_ID": "X",
        "APP_NAME": "X"
      },
      "cordova-plugin-network-information": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-apprate": {},
      "cordova-plugin-x-socialsharing": {
        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+",
        "PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly."
      },
      "mx.ferreyra.callnumber": {},
      "cordova-plugin-crop": {},
      "com-sarriaroman-photoviewer": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  }
}

If someone has an idea. Thanks in advance. Cordially.

3
Do you have any plugins that would use the uiwebkit ? try updating your plugin and if that fails, create a new app and copy the code over there.Nicolas
Do you know how I can verify this? The concern is that it is a very large application, and I am afraid that starting a project again at 0 will take time (even by making copy / paste) Thank you for your response.Julien-59
Make sure all the cordova plugins you are using are up to date. I am not aware of any automatic way to finding out. You could also a project wide search.Nicolas
I have updated all cordova plugins, and I still have the same concerns ...Julien-59

3 Answers

1
votes

I have fixed my app for the exact issue recently. Since you have updated all the packages to the latest versions, I would suggest you to directly jump tp the 4th step below.

For others, Here are the steps to fix the issue:

1) Ensure your cordova-plugin-ionic-webview is updated to the latest version 5.0.0. You need to run these two commands to do that.

ionic cordova plugin remove cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-ionic-webview@latest

2) Ensure your cordova-ios is updated to the latest version 6.0.0. Run this command to update it.

npm install cordova-ios@latest --save

3) Check your package.json to see if the versions are updated for both cordova-ios and cordova-plugin-ionic-webview.

4) Ensure you add WKWebViewOnly preference to config.xml file.

<platform name="ios">
    <preference name="WKWebViewOnly" value="true" />
    ...
</platform>

5) This is the most important step. Ensure you remove the ios platform and add it again. Run these commands to remove and add the ios platform.

ionic cordova platform rm ios
ionic cordova platform add ios

Now, when you build the ios app and publish it to the app store, you can see the issue will be fixed.

0
votes

Please run this command and check which plugin is including reference to UIWebView.

grep -r "UIWebView" .

Then, you can try to remove all those references before compiling.

0
votes

I had to remove cordova-plugin-inappbrowser & cordova-sms-plugin to get this working. It seems like they both use UIWebView modules.