我正在将Mac OS Catalina与xcode版本11.2(11B52)配合使用,当尝试将应用程序从xcode运行到iPhone时,它显示空白屏幕。控制台显示以下日志,但没有足够的详细信息
2019-11-04 20:15:41.867253-0800 Scan Buddy[8937:3278680] Apache Cordova native platform version 5.0.1 is starting.
2019-11-04 20:15:41.867470-0800 Scan Buddy[8937:3278680] Multi-tasking -> Device: YES, App: YES
2019-11-04 20:15:41.960594-0800 Scan Buddy[8937:3278680] CDVWKWebViewEngine: trying to inject XHR polyfill
2019-11-04 20:15:42.149221-0800 Scan Buddy[8937:3278680] CDVWKWebViewEngine will reload WKWebView if required on resume
2019-11-04 20:15:42.149295-0800 Scan Buddy[8937:3278680] Using Ionic WKWebView
2019-11-04 20:15:42.149721-0800 Scan Buddy[8937:3278680] [CDVTimer][console] 0.029922ms
2019-11-04 20:15:42.149785-0800 Scan Buddy[8937:3278680] [CDVTimer][handleopenurl] 0.023007ms
2019-11-04 20:15:42.150622-0800 Scan Buddy[8937:3278680] [CDVTimer][intentandnavigationfilter] 0.815034ms
2019-11-04 20:15:42.150668-0800 Scan Buddy[8937:3278680] [CDVTimer][gesturehandler] 0.015974ms
2019-11-04 20:15:42.153164-0800 Scan Buddy[8937:3278680] [CDVTimer][camerapreview] 2.477050ms
2019-11-04 20:15:42.154924-0800 Scan Buddy[8937:3278680] [CDVTimer][codepush] 1.708984ms
2019-11-04 20:15:42.156765-0800 Scan Buddy[8937:3278680] [CDVTimer][file] 1.790047ms
2019-11-04 20:15:42.156813-0800 Scan Buddy[8937:3278680] CDVIonicKeyboard: resize mode 1
2019-11-04 20:15:42.157333-0800 Scan Buddy[8937:3278680] [CDVTimer][keyboard] 0.514984ms
2019-11-04 20:15:42.160736-0800 Scan Buddy[8937:3278680] WARNING: The splashscreen image named LaunchStoryboard was not found
2019-11-04 20:15:42.160771-0800 Scan Buddy[8937:3278680] [CDVTimer][splashscreen] 3.399014ms
2019-11-04 20:15:42.161866-0800 Scan Buddy[8937:3278680] [CDVTimer][statusbar] 1.065969ms
2019-11-04 20:15:42.161902-0800 Scan Buddy[8937:3278680] [CDVTimer][TotalPluginStartup] 12.248993ms
2019-11-04 20:15:42.165805-0800 Scan Buddy[8937:3278680] WARNING: The splashscreen image named LaunchStoryboard was not found
2019-11-04 20:15:42.165892-0800 Scan Buddy[8937:3278680] WARNING: The splashscreen image named LaunchStoryboard was not found
2019-11-04 20:15:42.185557-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:42.185585-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:42.270186-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:42.533816-0800 Scan Buddy[8937:3278680] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2019-11-04 20:15:42.534498-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:42.534573-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:42.534642-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:42.774098-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:43.469748-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
2019-11-04 20:15:43.470273-0800 Scan Buddy[8937:3278680] [Process] kill() returned unexpected error 1
答案 0 :(得分:0)
因此,要为cordova插件实现SalesforceMobileSDK,我实现了一个小的javascript来关闭浏览器窗口,如下所示
<script>
var event = new CustomEvent("oauthCallback", {'detail': window.location.href});
if(window.opener !== null)
window.opener.document.dispatchEvent(event);
window.close();
</script>
这似乎是罪魁祸首。