Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.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
Ios 在xcode 8.3中未识别AVCaptureSession_Ios_Objective C_Xcode - Fatal编程技术网

Ios 在xcode 8.3中未识别AVCaptureSession

Ios 在xcode 8.3中未识别AVCaptureSession,ios,objective-c,xcode,Ios,Objective C,Xcode,我是iOS开发新手,我正试图按照本教程来尝试苹果提供的新的机器学习功能 不幸的是,在视频播放3分钟后,当我尝试使用AVCaptureSession()构造实例时,xcode给了我一个错误,说“使用未解析标识符‘AVCapture’” 我不确定我做错了什么。到目前为止,我已经在这里展示了我的代码,并附上了我的xcode用户界面截图 import UIKit import AVKit class ViewController: UIViewController { override fun

我是iOS开发新手,我正试图按照本教程来尝试苹果提供的新的机器学习功能

不幸的是,在视频播放3分钟后,当我尝试使用AVCaptureSession()构造实例时,xcode给了我一个错误,说“使用未解析标识符‘AVCapture’”

我不确定我做错了什么。到目前为止,我已经在这里展示了我的代码,并附上了我的xcode用户界面截图

import UIKit
import AVKit
class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        //here is where we start up the camera
        let captureSession = AVCaptureSession()
    }
}
显示错误时的xcode UI图像


非常感谢您的帮助,是的,我尝试过清理和重建以及重新启动xcode,但没有成功。

您需要在类文件中导入AVFoundation。参考此