亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

WKWebView 線程 1:使用位置時發出 SIGABRT 信號

WKWebView 線程 1:使用位置時發出 SIGABRT 信號

慕容708150 2021-11-04 17:52:44
我是 Swift 和 WKWebView 的新手。我在我的應用程序中實現了一個 WKWebView。我想在其中顯示一個網站,該網站使用https://www.google.com/maps.我NSLocationWhenInUseUsageDescription在Info.plist.當我第一次打開應用程序時,會出現一個詢問位置的提示。當我單擊Allow該應用程序時,該應用程序因Thread 1: signal SIGABRT錯誤而崩潰。我檢查了我所有的網點,絕對沒有錯誤。還顯示錯誤:UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!但我沒有明確調用 aUIAlertView所以我不知道如何解決這個問題。
查看完整描述

3 回答

?
MM們

TA貢獻1886條經驗 獲得超2個贊

我也是,這很糟糕。


 *** Terminating app due to uncaught exception 'NSObjectNotAvailableException', reason: 'UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!'

*** First throw call stack:

(

    0   CoreFoundation                      0x00007fff23b98bde __exceptionPreprocess + 350

    1   libobjc.A.dylib                     0x00007fff503b5b20 objc_exception_throw + 48

    2   CoreFoundation                      0x00007fff23b98a1c +[NSException raise:format:] + 188

    3   UIKitCore                           0x00007fff466e9463 -[UIAlertView initWithFrame:] + 417

    4   UIKitCore                           0x00007fff466e9ad0 -[UIAlertView initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:] + 218

    5   UIKitCore                           0x00007fff47516acf +[UIAlertView(ViewServiceSupport) _alertViewForWindow:] + 217

    6   UIKitCore                           0x00007fff476cdb44 -[UIWebGeolocationPolicyDecider _executeNextChallenge] + 242

    7   WebKit                              0x00007fff2d123a6d _ZN6WebKit43decidePolicyForGeolocationRequestFromOriginEPN7WebCore14SecurityOriginERKN3WTF6StringEPU37objcproto26WebAllowDenyPolicyListener11objc_objectP8UIWindow + 169

    8   WebKit                              0x00007fff2d123641 -[WKGeolocationProviderIOS(WebGeolocationCoreLocationUpdateListener) geolocationAuthorizationGranted] + 603

    9   WebKit                              0x00007fff2d12328d -[WKGeolocationProviderIOS

...


查看完整回答
反對 回復 2021-11-04
?
浮云間

TA貢獻1829條經驗 獲得超4個贊

我也是,這很糟糕。


 *** Terminating app due to uncaught exception 'NSObjectNotAvailableException', reason: 'UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!'

*** First throw call stack:

(

    0   CoreFoundation                      0x00007fff23b98bde __exceptionPreprocess + 350

    1   libobjc.A.dylib                     0x00007fff503b5b20 objc_exception_throw + 48

    2   CoreFoundation                      0x00007fff23b98a1c +[NSException raise:format:] + 188

    3   UIKitCore                           0x00007fff466e9463 -[UIAlertView initWithFrame:] + 417

    4   UIKitCore                           0x00007fff466e9ad0 -[UIAlertView initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:] + 218

    5   UIKitCore                           0x00007fff47516acf +[UIAlertView(ViewServiceSupport) _alertViewForWindow:] + 217

    6   UIKitCore                           0x00007fff476cdb44 -[UIWebGeolocationPolicyDecider _executeNextChallenge] + 242

    7   WebKit                              0x00007fff2d123a6d _ZN6WebKit43decidePolicyForGeolocationRequestFromOriginEPN7WebCore14SecurityOriginERKN3WTF6StringEPU37objcproto26WebAllowDenyPolicyListener11objc_objectP8UIWindow + 169

    8   WebKit                              0x00007fff2d123641 -[WKGeolocationProviderIOS(WebGeolocationCoreLocationUpdateListener) geolocationAuthorizationGranted] + 603

    9   WebKit                              0x00007fff2d12328d -[WKGeolocationProviderIOS

...


查看完整回答
反對 回復 2021-11-04
?
阿波羅的戰車

TA貢獻1862條經驗 獲得超6個贊

有趣的是,您沒有在“始終定位”描述中收到此錯誤。但你永遠找不到位置...

我已將我的應用程序降級到目標平臺“iOS 12”而不是 13,然后允許第二個“警報”WKWebView使用位置數據。我無法工作,如何提供一個UIAlertControl代替UIAlertViewWKWebView是要求。

網上有很多人抱怨 iOS 13 中的更新,以及有多少框架和庫受到這些變化的影響。


查看完整回答
反對 回復 2021-11-04
  • 3 回答
  • 0 關注
  • 368 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號