iphone build error that makes me want to buy a nail gun - iphone

I'm just trying to build a simple update (which I have done before) for an iphone app, but now for some reason I'm getting this error. Can anyone tell me what it means?
Command/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist failed with exit code 127
sh: plutil: command not found
Here are the Build Results:
CopyPNGFile /Users/me/path/build/Dist-iphoneos/MyApp.app/img_000.png images/img_000.png
cd /Users/me/
setenv COPY_COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
"/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" /Users/path/images/img_000.png /Users/me/path/build/Dist-iphoneos/MyApp.app/img_000.png
sh: dirname: command not found
CopyPlistFile /Users/me/path/build/Dist-iphoneos/MyApp.app/Entitlements.plist Entitlements.plist
cd /Users/me/
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist --convert binary1 Entitlements.plist --outdir /Users/me/path/build/Dist-iphoneos/MyApp.app
sh: plutil: command not found

Your PATH variable is screwed up for some reason. You want to look into how exactly that happened. This is yours (colon-separated for emphasis):
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
:/Developer/usr/bin
:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
This is what a working PATH looks like:
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
:/Developer/usr/bin
:/usr/bin
:/bin
:/usr/sbin
:/sbin"
(line separation is to clarify how PATH variables are separating paths)
Notice how mine has /usr/bin:/bin:/usr/sbin:/sbin and yours does not? This is the problem right there. The shell script only finds executables in its path, and while the files are in /usr/bin/, it doesn't find them.
For an SO discussion on Xcode PATH's, see e.g. where is $PATH set in xcode?

Is it possible that your path environment variable is not set somehow?
You have:
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/System/Library/Frameworks/JavaVM.frameworK/Versions/1.6/Home/"
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist --convert binary1 Entitlements.plist --outdir /Users/me/path/build/Dist-iphoneos/MyApp.app
While I show:
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/opt/local/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
builtin-infoPlistUtility test34-Info.plist -genpkginfo /Users/gnd/Desktop/test34/build/Debug-iphonesimulator/test34.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/gnd/Desktop/test34/build/Debug-iphonesimulator/test34.app/Info.plist
I don't see /usr/bin in your path.
(in terminal:
echo ${PATH}
though most OS X GUI applications get their path from ~/.MacOSX/environment.plist not 100% sure about Xcode though.
Additional Info:
from the 'man bash' page:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
So if you have it in .bash_login but .bash_profile exists, then your change will not be seen.
Also note the comment about the GUI apps PATH definition alternate file above.
You may need to log out and then back in to get the change to "take".

I had same problem.... the problem is that plutil is not in any of the directories in PATH.
My solution was to make a copy from /usr/bin to /user/local/bin which is in the PATH.
No idea if the problem is Xcode, OS X or Apple.

plutil usually resides in /usr/bin. Make sure it's there. If it's not, you may have installed your Developer Tools without unchecking (or with unchecking) the System Tools checkbox, which puts the base Mac OS X programmer tools into /usr.

Tried reinstalling the SDK?

I have gone over the answers provided and none of them worked for me. The problem persisted.
I looked carefully at the error in xcode and notice that it was looking for the image in the wrong place. In my case I had copied and renamed the directory containing my project. None of the references to my images were updated.
I fixed my problem by right clicking the project file in finder and clicking Show Package Contents. I then opened the *.pbxproj in xcode. I did a find and replace on the file to replace the name of the old folder with the new folder.
After closing and opening xcode this solved my problem.
I hope this helps others...

I've seen this error before. The issue lies in a corrupted .png file. The error is pretty deceiving. Try deleting the affected .png and replace it back in your project from a backup or clean version of that file. That should clear up the build errors.

this error will also show if you deleted a file via finder (not in xcode) then try to archive. So make sure that none of your files are listed in red and if they are remove it from your project.

Related

installing MUSCLE on windows

I want to install the lates version of MUSCLE downloaded from http://www.drive5.com/muscle/downloads.htm
named muscle3.8.31_i86win32.exe . As the guidelines
http://www.drive5.com/muscle/manual/install.html
says I have to write the below line in the command prompt:
C:\Program Files (x86)\muscle3.8.31_i86win32 -in seqs.fa -out seqs.afa
However, I faced this error:
MUSCLE v3.8.31 by Robert C. Edgar
http://www.drive5.com/muscle This software is donated to the public
domain. Please cite: Edgar, R.C. Nucleic Acids Res 32(5), 1792-97.
* ERROR * Cannot open 'seqs.fa' errno=2
I am sure the file exists in the mentioned directory, but I don't why has this happened and how can I fix it. Any idea?
The program is reporting that the OS reported that the file doesn't exist. (That's what errno 2 is.)
Testing reveals that relatives paths are resolved relative to the current work directory as expected.
So, your operating system is saying there's no file named seqs.fa in the current work directory.
Double check the name of the file you have. Keep in mind that File Explorer hides known file extensions by default so using dir would be more reliable.

Unity3d OSX "Application can't be opened"

I'm using a PC and I've created a build for Mac standalone.
I shared the file with my test user by zipping and emailing the build, but when he tries to run the application he sees this error:
The application "SomeApp.app" can't be opened.
After some searching, I learned that I need to do chmod to open the file. Can anyone tell me how to do that on a Mac?
The zip format doesn't have easy support for Unix-like file permissions, so your transfer process is stripping any permission flags that OSX uses to recognize files within that zip that are supposed to be executable. This can also happen with other file transfer solutions, so it's something to watch out for.
The best solution would be to create an archive which does keep those permissions, such as a tar archive.
Failing that, you can have a Mac user open a terminal and set the permission flag manually:
chmod a+x SomeApp.app/Contents/MacOS/*
(Replace SomeApp.app with whatever your .app folder is named)
I had the same issue, I left an answer here, at the bottom: https://forum.unity.com/threads/mac-build-breaking-when-uploaded-to-storage.1093330/
The problem was not with the .zip, but rather with the build itself. Ran fine on my Mac, did NOT run fine once I uploaded it and downloaded it again (or if anyone else downloaded it).
Edited 12/8/2021, as per EmiOB's suggestion, to add the text of my answer (same as in the link):
This worked for me on 2020.3.16f1:
In the Unity Editor: Build Settings, check the box that lets you make an XCode project (requires having XCode installed, I believe I have Xcode 11)
Open the XCode project
Build
That solved my problem :)

Xcode: Warning: Multiple build commands for output file AND error: unable to open executable ''

I've been reading countless other posts and trying numerous fixes, but nothing has worked for my problem. I'll preface this by saying that I haven't used Xcode on this Macbook in some 2-3 months. This is the only project (out of the 4 or so I've tried) that has this problem. The first thing I did after opening Xcode was I changed the name of the project as well as a .h and .m file. I did all of this through Xcode, not Finder.
Nothing is appearing in the Navigator in red text which would indicate that it can't be found. Here is what I've already tried (many times).
Close/Open Xcode.
Clean both the project and build folder.
Delete Derived Data folder.
Ran a Disk Utility to repair permissions.
Restarted the computer.
Tried different combinations of Code Signing.
Delete App from device.
Searched through project for any duplicate file names.
Here is the warning verbatim:
Warning: Multiple build commands for output file /Users/jinser/Library/Developer/Xcode/DerivedData/Landmarks-bgnzcomxftpffiezmwocaqdydrlj/Build/Products/Debug-iphoneos/Landmarks.app/Landmarks
and here is the error:
GenerateDSYMFile /Users/jinser/Library/Developer/Xcode/DerivedData/Landmarks-bgnzcomxftpffiezmwocaqdydrlj/Build/Products/Debug-iphoneos/Landmarks.app.dSYM /Users/jinser/Library/Developer/Xcode/DerivedData/Landmarks-bgnzcomxftpffiezmwocaqdydrlj/Build/Products/Debug-iphoneos/Landmarks.app/Landmarks
cd "/Users/jinser/Desktop/Kevin/Cocos2D Projects/ARSpaceships"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/usr/bin/dsymutil /Users/jinser/Library/Developer/Xcode/DerivedData/Landmarks-bgnzcomxftpffiezmwocaqdydrlj/Build/Products/Debug-iphoneos/Landmarks.app/Landmarks -o /Users/jinser/Library/Developer/Xcode/DerivedData/Landmarks-bgnzcomxftpffiezmwocaqdydrlj/Build/Products/Debug-iphoneos/Landmarks.app.dSYM
error: unable to open executable ''
This is Xcode 4.2 on Mac 10.6.8. Please, any advice would be appreciated. I am losing my mind.
Thanks.
So to whoever runs into this problem and all of the other solutions out there do not work for you, make sure you don't have a project folder that shares the same name as the project. For instance, my project is called Landmarks and I had a folder inside the resources also called Landmarks. Once I renamed the folder, all was well.
Not my answer, but LargeGlasses provided the real answer (for me) in a comment, I've formulated it as an answer in its own right because I can't Up Vote the comment.
any two files within your project that have the same name will cause this warning.
In my case, I had an icon with the same name in different subfolders, one was used by the App and the other was part of my help resource located in a different folder. The solution is to just rename one of the two.
All credit and my thanks for this answer to LargeGlasses.

How to Manually Symbolicate iOS Crash to View Crash Logs

Trying to debug app. The trouble is I cannot find this program.
symbolicatecrash.sh
sudo cp /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneRemoteDevice.xcodeplugin/Contents/Resources/symbolicatecrash /usr/local/bin/
Is it a separate download? I am using XCode 3.2.3
Thanks.
EDIT :: XCode 4.3
You will want to follow the same steps as outlined in the original answer (below) with a few exceptions.
First, you need to fix the Xcode path. Open a terminal and run:
/usr/bin/xcode-select -print-path
If it displays "/Developer" or anything but "/Applications/Xcode.app/Contents/Developer/" then it is wrong. To fix this run the command:
sudo /usr/bin/xcode-select -switch
/Applications/Xcode.app/Contents/Developer/
You can now run all the steps below, with the exception that the symbolicatecrash command is in a new spot (again). This is because Xcode now installs as an app. To find symbolicatecrash run this from the terminal:
find /Applications/Xcode.app -name symbolicatecrash -type f
This should return:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
Before running symbolicatecrash you may wish to go to this directory like:
cd
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
Original Answer :: Xcode < 4.3
Path for symbolicatecrash
Search from a terminal using:
find /Developer -name symbolicatecrash -type f
For me this returned:
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash
How to Manually Symbolicate a Crash Log
Run the symbolicatecrash command with the crash log as the first argument and your dSYM file as your second argument. Note that if you will be running symbolicatecrash from the current directory that you MUST put ./ in front like ./symbolicatecrash unless your PATH environment variable includes the directory that the command resides in.
I changed to the directory that had the symbolicatecrash command in it first (note: will be different for Xcode 4.3, see top):
cd
/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/
Then I executed the following command:
./symbolicatecrash /somePath/MyCrashLogFile.crash
/somePath/MyAppName.app.dSYM
How to Find the dSYM file:
You must have the archive that was used to create the build with the crash to get the dSYM file.
Here are the steps:
Right click (or ctrl click) the archive from organizer and choose "Show in Finder".
From the xcarchive file in finder, right click (or ctrl click) this file and choose "Show Package Contents". You will then see a "dSYMs" folder.
Inside the "dSYMs" folder you will find "YourAppName.app.dSYM" file that you will need to symbolicate files.
A plugin is available for Xcode under the Product menu. This plugin is available through Alcatraz package manager or can be directly downloaded from github.
This plugin internally incorporates a shell script that does the set up of running the following commands for manual crash symbolication.
Set an alias to symbolicatecrash.pl perl script
alias
symbolicatecrash='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash'
To find symbolicatecrash, should it differ from the alias above:
find /Applications/Xcode.app -name symbolicatecrash -type f
Set the DEVELOPER_DIR variable:
export DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer'
With the dSYM the crash can be symbolicates as:
symbolicatecrash /path/to/MyApp_2012-10-01_Device.crash
/path/to/MyApp.app.dSYM.
One way to symbolicate a crash log is to run the following command on terminal:
xcrun atos -o MyApp.app/MyApp -arch armv7 -l 0xb7000 -f MyApp.crash
Replace the example hexadecimal number(0xb700) in the command above with the base load address. Base load address is the first memory address in the line immediately after
"Binary Images:"
To get the .app file:
Right click on the xcarchive file and select Show Package Contents
The .app file is in the Products/Applications directory.
I just wrote a post on debugging crash log 5 min ago here: http://just2us.com/2010/10/reading-iphone-crashlog/
You might not need symbolicatecrash.sh anymore if drag and drop the logs to Xcode is good enough for your purpose. I am using 3.2.4, and I can't find the script too.
As Apple explains, Xcode will try to symbolicate automatically. It uses symbolicatecrash and spotlight to do that. However if the app wasn't built locally or it was deleted, then the necessary .app and .dsym files are not available.
So keep around the dsym file and the app of released versions. Build tools will often zip the .dsym file to a .dsym.zip and package the .app as an .ipa. You can unzip both and copy .app and .dsym to the same folder. Then Xcode will be able to find them using spotlight.
Here is a simple method I use:
Open Xcode 6
Plug in your dev device
Within Xcode, go to Window > Devices > Select your device
Press 'View Device Logs'
Drag your report into the window to view it

update iphone app "CodeResources file must be a symbolic link"

I tried to update an iphone app, which lies in an other "itunes connect" profile. I used "application loader" and everything is fine until I try to upload the zip file
I get this strange message and cant figure out whats going wrong
"The CodeResources file must be a symbolic link to _CodeSignature/CodeResources"
I opened the bundle and the folder _CodeSignature is there.
I compiled the app with my distribution profile (no problems)
How are you zipping it? I'm betting that FooApp.app/CodeResources is a file, not a symlink.
If you're using command-line "zip", you need to use zip -y -r to preserve the symlink.
Had the same issue with XCode 3.2.5 (new submission interface), and all it took was to:
delete the build folder
clean, and then
build and archive again.
I had the same issue. But then I noticed that I was building in release mode to the simulator, and not a device. When I targeted a device, I got the proper application file, which I then zipped with the iTunes Artwork and submitted without issue.
I had the same issue here but I "fixed" it after I changed the "Deployment Target" from 2.0 to 3.0 in the target I was building and removed the "Architectures" to only armv6 (before I had both armv6 and armv7). Finally I had to put 'No' to 'Build Active Architecture Only'.
I haven't figured out why I keep getting this error for every binary I create. I've followed all the standard procedures (double-checking my project settings, deleting build folders, cleaning all targets, removing and reinstalling certificates and provisioning profiles, creating and installing new certificates and provisioning profiles, repairing disk permissions, etc) but none of them seem to solve the problem.
I think the problem is that my XCode installation is unable to create symbolic links. I might reinstall it (or even OS X) to see if that fixes the issue permanently.
But in the mean time, this works for me. I use terminal to navigate into the binary and run the following commands
rm CodeResources
ln -s _CodeSignature/CodeResources CodeResources
This deletes the invalid CodeResources file and replaces it with the required symbolic link to _CodeSignature/CodeResources.
I just ran across this issue. It turned out, I had two info.plist files in my resources folder (one for the iPhone version and another for the iPad version). Once I took care of that, the issue went away.
Try this on the command line:
cd (to where your project is)
ln -s _CodeSignature/CodeResources CodeResources
I've just had the same problem. Turns out the project file project.pbxproj in Project.xcodeproj had been corrupted while uploading to an SVN server.
My solution was simply to revert to an older revision, which worked fine.
You have to:
1. Enter the AppName.app folder
2. Create a file named CodeResources
3. Open the file with a plain text editor
4. Type in _CodeSignature/CodeResources (The path where the actual CodeResources file is.)
{The app will now know where the CodeResources file is, and will have an account for all the files in the .app folder.}