Trouble building Ionic v3 project for iOS

I’ve been trying to update an Ionic 3 project to fix the decprecated webview:

I’ve upgraded cordova-ios to version 5.1.0 and I’ve also installed cordova-plugin-ionic-webview and generally updated my cordova packages. I’ve also made sure <preference name="WKWebViewOnly" value="true" /> is in my config.xml

I’m able to build my project for the web, but when building for ios like so:

> rm -rf www plugins platforms node_modules package-lock.json
> npm install
> ionic cordova platform add ios
> ionic cordova build ios --prod --release -- --buildFlag="-UseModernBuildSystem=0"

I get the following error:


The following build commands failed:
        Ld /Users/timmyomahony/Library/Developer/Xcode/DerivedData/MyApp-efhsybodwjjvcgfwxgzjnqcupbdy/Build/Intermediates.noindex/ normal arm64
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.

        cordova build ios --release exited with exit code 65.

Here is my info:


   Ionic CLI          : 6.12.0 (/Users/timmyomahony/.nvm/versions/node/v12.18.3/lib/node_modules/@ionic/cli)
   Ionic Framework    : ionic-angular 3.9.10
   @ionic/app-scripts : 3.2.1


   Cordova CLI       : 10.0.0
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 20 other plugins)


   cordova-res (update available: 0.15.2) : 0.15.1
   native-run                             : 1.2.2


   Android SDK Tools : 26.1.1 (/Users/timmyomahony/Library/Android/sdk)
   ios-deploy        : 1.11.3
   ios-sim           : 8.0.2
   NodeJS            : v12.18.3 (/Users/timmyomahony/.nvm/versions/node/v12.18.3/bin/node)
   npm               : 6.14.6
   OS                : macOS Catalina
   Xcode             : Xcode 12.2 Build version 12B45b

Specifically here are my plugins:

call-number 0.0.2 "Cordova Call Number Plugin"
cordova-android-firebase-gradle-release 4.0.0 "cordova-android-firebase-gradle-release"
cordova-android-play-services-gradle-release 4.0.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
cordova-ios-plugin-no-export-compliance 0.0.5 "iOS No Export Compliance"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-facebook4 4.2.1 "Facebook Connect"
cordova-plugin-firebasex 6.0.2 "Google Firebase Plugin"
cordova-plugin-geolocation 4.1.0 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 3.4.1 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova.plugins.diagnostic 4.0.12 "Diagnostic" 4.2.2 "Launch Navigator"

I’ve been trying to solve this for days and I understand it probably has something to do with XCode 12 and/or cordova-ios and/or webviews

Code 65 seems to be a generic error. I’ve had these errors in the past which have required me to open XCode, apply signing certs and make sure the legacy build system is being used in the workspace settings, but this doesn’t fix the issue.

Here are some relevent links: