微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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 @R_217_4045@ion,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中编辑的图像文件相关)

重建你的应用程序!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐