STRINGS_FILE_OUTPUT_ENCODING not working for me in Xcode 3.2.5 - xcode

The STRINGS_FILE_OUTPUT_ENCODING build setting in Xcode 3.2.5 isn't working for me.
My source code, including the .strings files, are UTF-8. I want the built application to have the .strings files stored as UTF-16.
The Project | Edit Active Target "Build" tab (there's only one target) is set up as follows:
"Convert copied Files" (APPLY_RULES_IN_COPY_FILES) is checked.
"Strings file Output Encoding" (STRINGS_FILE_OUTPUT_ENCODING) is set to UTF-16.
But the .strings files in the .app that is built are still UTF-8.
Am I wrong about the purpose of STRINGS_FILE_OUTPUT_ENCODING? Or am I doing it wrong? Or what?

For anyone else with this problem:
This was caused by not properly registering the .strings files in Xcode as being for translations. The structure of the localization folders was wrong. When I corrected the structure and properly registered the .strings files for localization, everything worked.
(This was a project I inherited.)

Related

Dereferences a xml file from xcode

I made a huge mistaking in renaming my xml file from xcode and I'm not sure how to fix it. My app has a feature that reads all local xml files built with the project. So now it is reading 2 of the same xmls with different names.
I tried deleting the file, added it back in, and Dereferencing it but no luck. I also made sure to delete my app and re building the project. When I do a full system scan for the xml file nothing pops up. The xml file is currently in the Trash.
Another issue might have been with the svn remote server but I tried svn rm --delete filename and it said the file does not exist. ( I tried the project directory as well as a few other sub directories).
Is there a way to Dereference/delete the file from the project?

Non-ASCII filenames mangled in deployment package

I deploy my VS2010 MVC3 project using "Build Deployment Package". The problem is that a couple of files have national (Swedish) characters ÅÄÖ in their filenames, and the deployment package gets these filenames wrong.
For example "Köpvillkor.pdf" becomes "K+Âpvillkor.pdf". The file has the right name in the unzipped "PackageTmp" folder, but inside the "<projname>-<version>.zip" file the filename is mangled, so it seems the problem lies in the way the package is zipped, i.e. it gets an UTF-8 encoded filename from the file system but stores it without conversion as ASCII or WIN1252 or some such inside the zip.
Is there any way to fix this?
If you use IIS to import the deployment package zip file, the filenames will be converted back to the proper encoding.
Unfortunately Winzip, 7-zip and even Windows Explorer Zip extension don't understand the filenames encoding, manual deployment is not possible.
I found today that you can uncheck "Create deployment package as a zip file" and then zip it manually. I use WinZip to zip it manually, and the non-ASCII characters are correctly preserved.

Xcode 4. Why Can't My Renamed Project Find It's Info.plist File?

Under Xcode 4 I renamed a project from Foo to Bar. The former Foo-Info.plist is renamed as Bar-Info.plist. The renamed file exists. On disk and in the project. All should be cool. All is not cool.
When I compile I get this:
could not read data from
'/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/Users/PATH/TO/Bar-Info.plist':
The file “Bar-Info.plist” couldn’t be opened because there is no such
file.
The file does exist in the path shown as well as in the build settings. Is there some cached data I need to purge to unwedge this.
XCode is looking in the wrong folder for your Info.plist. Check the Build Setting for Info.plist File; make sure there aren't any qualifiers to the file name.

How to unconditionally copy headers in Xcode?

I have set a header file's role in Xcode to private so that it will get copied to the desired location by the Copy Headers build phase. It works as expected if there is not already a header file of that name in the target location. But if there is an existing file, it does not overwrite it. Even if the header file has changed in the project it doesn't seem to update the copy in the target location. The Build Results windows shows a line "Copying MyFile.h" but the file is the old one.
This doesn't seem right and is definitely not what I want. How can I force Xcode to unconditionally copy (and overwrite if necessary) header files in the Copy Headers build phase?
Are you sure that you have actually changed the header file in the project? If Xcode says "Copying MyFile.h", then it's copying it. But if you accidentally changed the copy, instead of the original, then Xcode is simply doing what it thinks is right: copying the authentic version from the project over the altered version in the build product.
It would help if you'd paste the entire "pbxcp" line for that header, then it would be easy to see exactly what's going on.
I took this question over to the Xcode mailing list and had some back and forth there. It turns out that Copy Headers copies the file to a subfolder of the build folder, not to the absolute address I specified. Maybe it is not intended for what I am doing.
I've reverted to using Run Script to do the file copying.

XCode 3.1.2, header file not found

I have been trying to build a code that has dependencies with other header files that are not in the project directory. I added the paths to these header files in both HEADER_PATH and USER_PATH. However, I still see error while building. It says that the file is not found. I verified that the file exist in the path added to the header search path in project settings.
How do I make sure that all my header files referenced in the project is included and the paths are being picked by Xcode during compilation?
I tried copying all the files to the project with no luck. This is the first time iam using Xcode, so its kind of frustrating. Iam a linux guy and comfortable with make files. Is there a Make file for xcode which i can modify to include the header file directories.
You might want to check the order of your source files in your target's build phases to ensure that your dependencies are compiled before your source files that reference them.
Select your project in the Project Navigator.
Select your target.
Click on the Build Phases tab.
Click on Compile Sources to expand the section.
Drag the dependencies to the top of the list.
Are you sure you spelled the header file name correctly ? Is the case correct ? Did you use user quotes "" rather than system quotes <> ?
Assuming you've checked all the obvious things such as the above then one other thing to try is to quit Xcode, delete the "build" folder in your project directory, and try again - sometimes the build folder gets in a pickle internally.

Resources