I know this has been covered quite a lot, but I've been googling and trying things for almost 2 days straight now with no luck from the current solutions.
我知道这已经被涵盖了很多,但我已经用谷歌搜索和尝试了近2天,现在的解决方案没有运气。
I'm using XCode 4.6.2 to create a PhoneGap application, which currently builds to a device and simulator no problem. However, when I try to archive the file, I get the error message:
我使用XCode 4.6.2创建一个PhoneGap应用程序,该应用程序目前构建到一个设备和模拟器上,没有问题。但是,当我试图归档文件时,我得到了错误消息:
Command /usr/sbin/chown failed with exit code 1
命令/usr/sbin/chown以退出代码1失败。
It also lists every file in my www folder that I'm trying to compile as follows:
它还列出了我正在尝试编译的www文件夹中的每个文件:
chown: /my/folder/path/appName.app/www/filename.abc: Operation not permitted
乔恩:/我/文件夹/路径/ appName.app / www /文件名。美国广播公司(abc):操作不允许的
I've tried setting the "Build Active Architecture Only" to yes, for both the main project and the included PhoneGap project.
我尝试过将“构建活动架构”设置为yes,用于主要项目和包含PhoneGap项目。
I've tried combinations of different architectures. Currently removed armv6 & armv7s. Only armv7 remains at the moment.
我尝试过不同架构的组合。目前移除armv6和armv7s。目前只剩下armv7。
It seems like a permission problem, but I've gone in via the terminal and doubly made sure I have full rights to the folder. I'm using the main admin user account.
这似乎是一个权限问题,但我已经通过了终端,并且加倍确保了我对文件夹有完全的权限。我使用的是主管理用户帐户。
I did notice however, that when I go to the terminal and type:
但是我注意到,当我进入终端类型时
sudo chown -R userName /path
sudo chown -R用户名/路径。
I get the exact same error as xcode produces.
我得到与xcode相同的错误。
It's my first experience using a Mac in general, let alone xcode, so there might be something fundamental that I'm missing too.
这是我第一次使用Mac的经验,更不用说xcode了,所以可能会有一些基本的东西我也不知道。
I opened up a hello world app to try archiving it, and that worked without any problem.
我打开了一个hello world应用程序,尝试将它归档,这工作毫无问题。
I've tried the small things like cleaning and rebooting.
我试过一些小的东西,比如清洁和重新启动。
Thank you.
谢谢你!
3 个解决方案
#1
7
Have you developed some of your Phone Gap app on a Windows machine? You may need to set your files be not read only on your Windows machine before you copy them to your Mac.
你在Windows电脑上开发过手机间隙应用程序吗?在将文件复制到Mac之前,您可能需要在Windows机器上设置文件。
#2
21
This problem is caused because some of your files (the ones that throw the chmod in xcode) don't have the proper owner/group set. They probably are set with root permissions, which can be caused by installing e.g. PhoneGap modules with sudo.
这个问题是由于您的一些文件(在xcode中抛出chmod的文件)没有合适的所有者/组集,它们可能是由root权限设置的,这可能是由于安装了sudo的PhoneGap模块导致的。
Run a sudo chown -R username:staff YourAppFolder
command on your original files and you will be able to archive your code again.
运行一个sudo chown -R用户名:在你的原始文件上使用你的appfolder命令,你将能够再次归档你的代码。
#3
6
If you are encountering the errors above with some files, probably it's because Xcode is tryng to chown the .app created and it can't change the permissions of some files.
如果您遇到一些文件上面的错误,可能是因为Xcode是tryng,它创建了.app,它不能更改某些文件的权限。
If you read the log of the errors, in the previous lines you wull see that there is a line starting with chown [....] .app
如果你读的日志错误,在前面的行你wull看到有一条线从乔恩(....].app
- copy that line
- 复制这条线
- open the terminal
- 打开终端
- type: sudo [paste the line copied]
- 类型:sudo[粘贴复制的线]
- insert your admin password
- 插入您的管理密码
- Archive again.
- 存档了。
It fixed for me.
这对我来说固定。
(Same thing if you have chmod errors)
(如果你有chmod错误)
#1
7
Have you developed some of your Phone Gap app on a Windows machine? You may need to set your files be not read only on your Windows machine before you copy them to your Mac.
你在Windows电脑上开发过手机间隙应用程序吗?在将文件复制到Mac之前,您可能需要在Windows机器上设置文件。
#2
21
This problem is caused because some of your files (the ones that throw the chmod in xcode) don't have the proper owner/group set. They probably are set with root permissions, which can be caused by installing e.g. PhoneGap modules with sudo.
这个问题是由于您的一些文件(在xcode中抛出chmod的文件)没有合适的所有者/组集,它们可能是由root权限设置的,这可能是由于安装了sudo的PhoneGap模块导致的。
Run a sudo chown -R username:staff YourAppFolder
command on your original files and you will be able to archive your code again.
运行一个sudo chown -R用户名:在你的原始文件上使用你的appfolder命令,你将能够再次归档你的代码。
#3
6
If you are encountering the errors above with some files, probably it's because Xcode is tryng to chown the .app created and it can't change the permissions of some files.
如果您遇到一些文件上面的错误,可能是因为Xcode是tryng,它创建了.app,它不能更改某些文件的权限。
If you read the log of the errors, in the previous lines you wull see that there is a line starting with chown [....] .app
如果你读的日志错误,在前面的行你wull看到有一条线从乔恩(....].app
- copy that line
- 复制这条线
- open the terminal
- 打开终端
- type: sudo [paste the line copied]
- 类型:sudo[粘贴复制的线]
- insert your admin password
- 插入您的管理密码
- Archive again.
- 存档了。
It fixed for me.
这对我来说固定。
(Same thing if you have chmod errors)
(如果你有chmod错误)