When building the project for distribution using the Archive build mode, the following error appears. When building in debug or release mode everything works fine. The mentioned directory is empty. The directory permissions are set to full access for the current user. Any ideas?
CopyStringsFile /Users/username/Library/Developer/Xcode/DerivedData/ProjectName-bikjmxotbfpkybhkqwlxysxcibrk/ArchiveIntermediates/ProjectName/InstallationBuildProductsLocation/Applications/ProjectName.app/es.lproj/Localizable.strings ProjectName/Resources/es.lproj/Localizable.strings
cd /Users/username/Coding/proj/game/ProjectName
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
builtin-copyStrings --validate --inputencoding utf-8 --outputencoding binary --outdir /Users/username/Library/Developer/Xcode/DerivedData/ProjectName-bikjmxotbfpkybhkqwlxysxcibrk/ArchiveIntermediates/ProjectName/InstallationBuildProductsLocation/Applications/ProjectName.app/es.lproj -- ProjectName/Resources/es.lproj/Localizable.strings
error: failed to remove /Users/username/Library/Developer/Xcode/DerivedData/ProjectName-bikjmxotbfpkybhkqwlxysxcibrk/ArchiveIntermediates/ProjectName/InstallationBuildProductsLocation/Applications/ProjectName.app/es.lproj/Localizable.strings: “Localizable.strings” couldn’t be removed.
This happened to me when I had duplicate references to a folder added to the project. Deleting the duplicate references fixed it.
Ok, i figured it out:
I don't exactly know why Xcode wanted to delete a file that wasn't existent at that location in the first place, but it think it had to do with the project file which was broken for no apparent reason.
The way i fixed it was to just delete all the Localizable.strings files from the project ( i had 6 for different languages each in its own .lproj directory ) and then add them again one by one. –
I also face this type of problem. But what I did is just clean up project "Product -> Clean" and rebuild it fix this problem
I had the same problem ... anyway, these 2 steps definitely solved it:
Make sure the Localizable.strings files are encoded in UTF-16 instead of UTF-8. So if you need to convert them you can do it in XCode by choosing the files and changing the Text Encoding to UTF-16 in the File Inspector
remove the references to the files from your project and re-add them. This should fix the CopyStringsFile error.
I had the same problem and simply cleaning didn't fix it.
I have multiple Build Configurations set up in order to output different apps with different bundle identifiers and a custom script that copies some files. When creating new Build Configurations with new custom files, these files were automatically added to the "Copy Bundle Resources" Build Phase when my script was already taking care of them.
So what I needed to do was simply to remove them from the Copy Bundle Resources list in MyTarget > Build Phases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With