Google Cordova 上的 WKWebView 导致地图自动完成失败 iOS

Google Maps Autocomplete fail with WKWebView on Cordova iOS

我正在开发一个 Cordova 应用程序,我最近在 iOS 版本上安装了 WKWebView(https://github.com/ionic-team/cordova-plugin-ionic-webview)。 我正在使用 Google Maps Place Autocomplete API 但它停止与 WKWebView 一起工作,如果我在输入字段中键入,就会出现此错误:

This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console:
https://console.developers.google.com/apis/api/places_backend?project=_ 
For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key

如果我返回正常的 webview (UIWebView),它可以工作,所以我认为这不是代码问题,并且 API 项目已获得使用 API 的完全授权。 我认为这与 WKWebView 中的 CORS 更改有关,但我真的不知道如何解决这个问题。

我自己解决了。 我不知道这是怎么可能的,但我刚刚创建了一个新的 API 密钥并且这个新密钥有效.. :/