如何在iOS 13中获得移动信号强度?

如何在iOS 13中获得移动信号强度?,ios,swift,xcode,Ios,Swift,Xcode,代码附在下面,但在iOS 13应用程序中崩溃。我能做些什么来解决这个问题 let application = UIApplication.shared let statusBarView = application.value(forKey: "statusBar") as? UIView 以这种方式访问statusBar总是一种黑客行为。删除此代码 如果您的应用程序确实需要访问信号强度,请查看NetworkExtension框架和NehostThelper类。感谢您的宝贵帮助

代码附在下面,但在iOS 13应用程序中崩溃。我能做些什么来解决这个问题

    let application = UIApplication.shared
    let statusBarView = application.value(forKey: "statusBar") as? UIView

以这种方式访问
statusBar
总是一种黑客行为。删除此代码


如果您的应用程序确实需要访问信号强度,请查看NetworkExtension框架和NehostThelper类。

感谢您的宝贵帮助,您有任何示例代码,我为此坐了3天。