有人知道 Xcode
上构建错误的解决方法吗?
欢迎所有建议。
例如:不可能那样,用 Objective-C
可能,而不是 Swift
环境: Swift:3.2,Xcode:9.2,Unity:2017.3.0f1,iOS:11.2.1
条件: 我正在尝试像这样使用 Swift 为 Unity 制作原生插件。
Unity C# -> Objective-C -> Swift
目前,我可以从 Unity
访问 iPhone 相机胶卷。
此处的项目名称为 GetDepthSample
。
错误详细信息:
当我在类定义上添加 ARSessionDelegate
时,我收到以下错误。
CameraRollSample.swift
其他信息:
GetDepthSample-Swift.h(在 Xcode 上自动生成)显示以下错误。 GetDepthSample-Swift.h
可以跳转到协议(protocol)ARSessionDelegate
的定义。
不仅ARSessionDelegate
,MetalKit
也显示类似的错误。
原始 Unity 项目
https://github.com/wapa5pow/CameraRollSample
非常感谢!
最佳答案
看看您在评论中发布的标题,在我看来,您可能需要在 Xcode 的项目设置中包含 ARKit 框架。尽管这通常会自动工作,但显然您的设置中缺少某些内容。
关于ios - 语义问题 : Cannot find the protocol declaration for ‘ARSessionDelegate’ ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47905490/