代码签名错误每当我尝试在新的SceneKit应用程序中替换库存文件时 [英] Code Signing Error Whenever I try replacing stock files in new SceneKit application

查看:171
本文介绍了代码签名错误每当我尝试在新的SceneKit应用程序中替换库存文件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以Xcode 8最近发布了,我仍然不确定究竟是什么导致了这个问题(可能只是因为它是Xcode的beta版本,或者我可能在某种程度上做错了什么)。

So Xcode 8 was recently released and I'm still unsure as to what exactly might be causing this problem (it might be just the fact that it's a beta version of Xcode or perhaps that I'm somehow doing something incorrectly).

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

The problem at hand is that I'm trying to create a new SceneKit application and I'm currently messing around with the .scn files.

我在hero.scnassets中创建了一个.scn文件hero.scn,并在hero.scnassets文件夹中提供了一个名为heroTexture的.png文件。 png

I created a .scn file, "hero.scn" inside of a "hero.scnassets" and also provided a .png file inside of the hero.scnassets folder by the name of "heroTexture.png"

在GameViewController.swift文件中,该项目通常由Xcode 8.0 beta 1提供的代码编辑如下:

The code normally provided by Xcode 8.0 beta 1 for this project in the "GameViewController.swift" file was edited as follows:

原始代码:

...
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, y: 2, z: 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.

PS:这是文件结构只是为了方便。

P.S: Here's a file structure just for ease.

推荐答案

通过三个简单步骤摆脱此构建错误:

Get rid of this build error in three easy steps:

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

1) delete the most current folder related to your app in DerivedData (~/Library/Developer/Xcode/DerivedData)

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

2) in the terminal, cd to the current project dir

3)运行


xattr -rc。

xattr -rc .

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

to remove all extended attributes (usually related to image files previously edited in Photoshop)

重建你的应用程序!

这篇关于代码签名错误每当我尝试在新的SceneKit应用程序中替换库存文件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆