Ios 警告:试图呈现已呈现的UIAlertController(null)(Swift)

Ios 警告:试图呈现已呈现的UIAlertController(null)(Swift),ios,swift,xcode,swift3,Ios,Swift,Xcode,Swift3,我从这里下载了一个项目 ,我添加了相对的pod,现在我尝试运行它来查看它是如何工作的,但是当我进入第二个viewController(用户应该在那里找到他位置附近的位置)时,这个功能被激活 func didReceiveResponse(response:QNearbyPlacesResponse?) -> Void { self.response = response if response?.status == "OK" { if let p = re

我从这里下载了一个项目 ,我添加了相对的pod,现在我尝试运行它来查看它是如何工作的,但是当我进入第二个viewController(用户应该在那里找到他位置附近的位置)时,这个功能被激活

func didReceiveResponse(response:QNearbyPlacesResponse?) -> Void {
    self.response = response
    if response?.status == "OK" {

        if let p = response?.places {
            places.append(contentsOf: p)
        }

        self.collectionView?.reloadData()
    } else {
        let alert = UIAlertController.init(title: "Error", message: "Unable to fetch nearby places", preferredStyle: .alert)
        alert.addAction(UIAlertAction.init(title: "Cancel", style: .cancel, handler: nil))
        alert.addAction(UIAlertAction.init(title: "Retry", style: .default, handler: { (action) in
            self.loadPlaces(true)
        }))
        present(alert, animated: true, completion: nil)
    }
    isLoading = false
}

我收到消息“无法获取附近的位置”,在控制台中我看到警告:“尝试呈现已经呈现的UIAlertController(null)”。这就是应用程序无法正确运行的问题吗?我怎样才能解决它?(我已经查看了此警告,但没有发现有用的内容)

您是否在谷歌地图上创建了一个项目,并获得了访问谷歌地图服务和Places api的api密钥?您是否已经提供了一个控制器?因为不能同时显示两个控制器,所以可能已经显示了警报。我也有同样的问题,但到目前为止无法阻止它,因为呈现的控制器为“null”,因此无法识别为警报。