【问题标题】:iOS app goes to background on launchiOS 应用程序在启动时进入后台
【发布时间】:2018-04-19 00:01:40
【问题描述】:

我在 Swift 3 中编写了一个应用程序,在升级到 iOS 11.1 后,它在启动时进入后台,而不是提示允许应用程序访问用户位置。

【问题讨论】:

    标签: ios swift swift3 cllocationmanager


    【解决方案1】:

    发现应用会抛出一个断言:

    Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:]
    

    在我的代码中,我发现为了解决问题而删除了这一行:

    locationManager.allowsBackgroundLocationUpdates = true
    

    【讨论】:

      猜你喜欢
      • 2013-02-16
      • 2011-03-10
      • 1970-01-01
      • 1970-01-01
      • 2012-11-10
      • 2012-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多