原因:
UIApplication.openURL(_:)
从iOS18开始被停止调用了
@available(iOS, introduced: 2.0, deprecated: 10.0)
open func openURL(_ url: URL) -> Bool
需使用下面方法替换
@available(iOS 10.0, *)
open func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any] = [:]) async -> Bool
@available(iOS 10.0, *)
open func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any] = [:], completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil)