Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode Beta 6-使用未声明的类型';CLLocationManagerDelegate';_Xcode_Swift_Cllocationmanager_Xcode6 Beta6 - Fatal编程技术网

Xcode Beta 6-使用未声明的类型';CLLocationManagerDelegate';

Xcode Beta 6-使用未声明的类型';CLLocationManagerDelegate';,xcode,swift,cllocationmanager,xcode6-beta6,Xcode,Swift,Cllocationmanager,Xcode6 Beta6,我刚刚从Xcode 6 Beta 3升级到Xcode 6 Beta 6。在Beta 3中,一切都运行良好,并按照我的要求进行了编译 现在,我无法使CLLocationManagerDelegate正常工作,即,我总是使用未声明的类型“CLLocationManagerDelegate”-错误消息 这是我的文件的外观: import UIKit import CoreLocation class ViewController: UIViewController, UITableViewDeleg

我刚刚从Xcode 6 Beta 3升级到Xcode 6 Beta 6。在Beta 3中,一切都运行良好,并按照我的要求进行了编译

现在,我无法使CLLocationManagerDelegate正常工作,即,我总是使用未声明的类型“CLLocationManagerDelegate”-错误消息

这是我的文件的外观:

import UIKit
import CoreLocation

class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, CLLocationManagerDelegate {
其他信息:

  • 我已经添加了CoreLocation框架(尝试直接在Xcode中添加它,也可以通过从文件夹拖放实际文件,不做任何更改)
  • 在启动Xcode 6 Beta 6之前,我已经多次重新安装了它(运行OSX 10.9.4,总是在第一次启动时崩溃)
  • 如您所见,我将CoreLocation导入到我的文件中
  • CLLocationManagerDelegate不会自动完成,它与CLLocationManager一样

有什么想法吗?我假设此处链接不正确。

尝试清理生成目录:

产品-->清洁

产品-->(Alt键)清除生成文件夹

删除派生数据:


窗口-->管理器-->删除派生数据

这是XCode中的一个错误。已在Beta7/Xcode6中解决。

出现“使用未声明类型”错误的另一个可能原因是,您的类也在您的测试目标范围内,但“未声明类型”不在目标范围内。

您是否清理了项目,删除了所有派生数据?是的,我已经试过多次了。事实上,我已经试过所有这些步骤多次了,错误仍然是一样的。如果你点击“CoreLocation”会发生什么?它应该打开定义文件。另一个想法:您是否将CoreLocationFramework包括到您的项目中?它会打开。“import CoreLocation.CLLocationManagerDelegate”语句在其中。当我单击CLLocationManagerDelegate或导入的任何其他文件(在ViewController以及定义文件中)时,会出现“找不到符号”错误。此外,如果我创建一个新项目,CLLocationManagerDelegate方面的一切都正常。