kiwix / kiwix-apple

Kiwix for iOS & macOS
https://apple.kiwix.org
GNU Lesser General Public License v3.0
478 stars 70 forks source link

Crash on clearing recent search #954

Closed HiroyasuNishiyama closed 1 month ago

HiroyasuNishiyama commented 1 month ago

Clicking clear recent search button crashes kiwix application on iPadOS 17.5. Running on Xcode, it shows the following uncaught exception:

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<SwiftUI.PlatformAlertController: 0x110263200>) of style UIAlertControllerStyleActionSheet from _TtGC7SwiftUI19UIHostingControllerGVS_15ModifiedContentVS_7AnyViewVS_12RootModifier__ (<_TtGC7SwiftUI19UIHostingControllerGVS_15ModifiedContentVS_7AnyViewVS_12RootModifier__: 0x112027800>). The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.  If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'

It works well on iPadOS 17.0, iOS, and macOS.

BPerlakiH commented 1 month ago

Thank you @HiroyasuNishiyama for reporting this.