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: [“https://www.googleapis.com/discovery/v1/apis/drive/v3/rest”], // v3

    try {
        gapi.client.init({ discoveryDocs: DISCOVERY_DOCS })
            .then(() => {
                gapi.client.setToken(token); 
                callback(null);
            }, (err) => {
                callback(err);
            })
    }
    catch (err) {
        callback(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" />
    </feature>
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
    <preference name="WKWebViewOnly" value="true" />
</platform>
<access origin="https://*.google.com" />
<access origin="https://*.googleapis.com" />
<allow-navigation href="https://*.google.com" />
<allow-navigation href="https://*.googleapis.com" />

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)?