【发布时间】:2021-12-16 15:11:10
【问题描述】:
每次我运行我的项目时,都会出现构建时错误,提示“CodeSign 失败,退出代码为非零”
我已经尝试清理我的构建文件夹,强制退出 Xcode,搜索网络。
这是完整的错误信息
"/Users/christian/Library/Developer/Xcode/DerivedData/ARDicee-exogyimjlcfynyfnnhzgsemlkeju/Build/Products/Debug-iphonesimulator/ARDicee.app:不允许资源叉、Finder 信息或类似的碎屑 命令 CodeSign 失败,退出代码为非零”
这里是截图:Error message screenshot
这是一些代码:
import UIKit
import SceneKit
import ARKit
类 ViewController: UIViewController, ARSCNViewDelegate {
@IBOutlet var sceneView: ARSCNView!
override func viewDidLoad() {
super.viewDidLoad()
// Set the view's delegate
sceneView.delegate = self
let diceScene = SCNScene(named: "art.scnassets/diceColladaCopy.scn")!
if let diceNode = diceScene.rootNode.childNode(withName: "Dice", recursively: true) {
diceNode.position = SCNVector3(x: 0, y: 0, z: -0.1)
sceneView.scene.rootNode.addChildNode(diceNode)
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// Create a session configuration
let configuration = ARWorldTrackingConfiguration()
// Run the view's session
sceneView.session.run(configuration)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
// Pause the view's session
sceneView.session.pause()
}
}
【问题讨论】: