小编Nil*_*esh的帖子

在 Swift 中检测用户位于建筑物的哪一层

我正在开发一个应用程序,该应用程序必须检测用户位于建筑物中的哪一层。

我尝试过使用CLLocation ( location.floor?.level),但该值始终返回 nil。

请建议我是否有其他方法来获得楼层水平。

cllocationmanager ios swift4

4
推荐指数
1
解决办法
2047
查看次数

应用程序崩溃在iOS 12.0中

应用程序崩溃在iOS 12.0之前的iOS 12.0它运行正常,我用谷歌搜索它但没有得到任何解决方案下面的崩溃日志.

由于未捕获的异常'NSUnknownKeyException'而终止应用程序,原因:'[setValue:forUndefinedKey:]:此类不是密钥值编码兼容的密钥shouldAlwaysAlertWhileAppIsForeground.

let content = UNMutableNotificationContent()
//App crash on below line
content.setValue(true, forKeyPath: "shouldAlwaysAlertWhileAppIsForeground")
Run Code Online (Sandbox Code Playgroud)

有人解决过这样的问题吗?

ios swift swift4.1 ios12

1
推荐指数
1
解决办法
536
查看次数

标签 统计

ios ×2

cllocationmanager ×1

ios12 ×1

swift ×1

swift4 ×1

swift4.1 ×1