Cordova with iOS wkwebview cannot access Google Drive using gapi

Hi everybody. I am successfully building my app using Cordova CLI 10.0.0 which creates the project using cordova-ios 6.2.0. I am using WKWebView but since using the latest iOS build stack I am unable to connect to Google Drive using gapi.

I successfully retrieve an Access token from my server which handles the gapi authentication but when I try to initialise gapi I get no response - no error and nothing is returned from the promise via the resolve or reject.

This does work when run directly in Safari and in Chrome but not when built using WKWebview so it has to be something to do with that.

gapi.init code:

loadDriveApi: function (token, callback ) {
// v3
const DISCOVERY_DOCS: [“”], // v3

    try {
        gapi.client.init({ discoveryDocs: DISCOVERY_DOCS })
            .then(() => {
            }, (err) => {
    catch (err) {

It never gets to the gapi.client.setToken(token) command.

Extract from config.xml:

 <platform name="ios">
    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
    <preference name="WKWebViewOnly" value="true" />
<access origin="https://*" />
<access origin="https://*" />
<allow-navigation href="https://*" />
<allow-navigation href="https://*" />

From what I can find out it looks like it is something to do with CORS but I thought the access origin and allow-navigation would resolve that. Are there further requirements Apple have added to make things more secure (more difficult)?