ios – 代码签名错误每当我尝试更换新的SceneKit应用程序中的库存文件

所以Xcode 8最近被发布了,我仍然不确定究竟可能导致这个问题(可能只是这个事实,它是Xcode的beta版本,或者说我以某种方式做错误的事情)。

目前的问题是我正在尝试创建一个新的SceneKit应用程序,而我目前正在使用.scn文件。

我在“hero.scnassets”里面创建了一个.scn文件“hero.scn”,并且在“heroTexture.png”的名称中还提供了一个.png文件,在hero.scnassets文件夹里面

通常在“GameViewController.swift”文件中为此项目的Xcode 8.0 beta 1提供的代码编辑如下:

原始码:

...
let scene = SCNScene(named: "art.scnassets/ship.scn")!
...
let ship = scene.rootNode.childNode(withName: "ship",recursively: true)!
ship.run(SCNAction.repeatForever(SCNAction.rotateBy(x: 0,y: 2,z: 0,duration: 1)))

编辑代码:

...
let scene = SCNScene(named: "hero.scnassets/hero.scn")!
...
let hero = scene.rootNode.childNode(withName: "hero",recursively: true)!
hero.run(SCNAction.repeatForever(SCNAction.rotateBy(x: 0,duration: 1)))

收到错误:

.../Xapp.app: resource fork,finder information,or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1

问题结论:

Why am I getting a signing error when all I’ve done is simply replaced files?

Sidenote: I know how to get the code signing issue to go away but that involves restarting the entire project (which I don’t mind). The problem I face however is whenever I change the files,I get this error.

P.S:这是一个文件结构,只是为了easy.

FileStruct

解决方法

在三个简单的步骤中摆脱这个构建错误:

1)删除DerivedData(〜/ Library / Developer / Xcode / DerivedData)中与应用程序相关的最新文件夹

2)在终端,cd到当前项目目录

3)跑

xattr -rc .

删除所有扩展属性(通常与以前在Photoshop中编辑的图像文件相关)

重建你的应用程序!

相关文章

在有效期内的苹果开发者账号(类型为个人或者公司账号)。还...
Appuploader官网--IOS ipa上传发布工具,证书制作工具跨平台...
苹果在9月13号凌晨(北京时间)发布 iOS 16,该系统的设备可...
计算机图形学--OpenGL递归实现光线追踪
Xcode 14打出来的包在低版本系统运行时会崩溃,报错信息是Li...