iPhone localization issue - iphone

We recently added localization support to my app and added Hungarian translation. It was working fine. But then we found that some characters were not proper so I sent the ".strings" file to translator and replaced the old file with updated file.
Now, the localized string appears in alertbox but all screen/form/NIB displays English only.
I have no clue what went wrong in this process. It's kinda urgent and unfortunately my coder is not much responsive.
I am a programmer but not much familier with Objective C. If I can get some help from expert fellas, I might be able to solve it.
Thanks a bunch!

I am not sure what was wrong exactly but I first restored that .string file with old version, opened it from Xcode and then replaced the content. One difference I observed was, there were two empty lines at EOF in old file, which was missing in new file, not sure if that caused the issue.
Thanks everyone!

Related

Phantom line display in Visual Studio Code IDE

In VS Code I have a tab with a plain text file I use for scratch while working during the day. I place all kinds code, questions, TODO lists, etc in this file and will reference it from time to time. It's helpful for history purposes.
At any rate, this file has ballooned up to well over 46,000 lines over the years and I'm now seeing this odd phantom line being injected at my cursor. I am unable to select it or remove it. I thought it was being displayed as VS Codes way of letting me know that a software update was available but when checking that was not the case. This is what it phantom line looks like, it seems to contain a history of CSS classes used over the years which is odd.
If I restart VS Code it goes away for a little while but then reappears. I have a feeling it might be because of the number of lines or perhaps memory but can't say for certain.
Has anyone else seen this behavior? I've probably enabled some setting by mistake and have no idea how to disable it.
Any suggestions would be greatly appreciated. Thank you!
Turns out it was the HTML End Tag Labels plugin that was trying to auto complete some HTML that was somewhere within the 46k lines.
I would have thought by identifying the file as type Plain Text, the plug-in would ignore trying to close HTML tags (since its not an HTML file) but alas that's not the case.
Thank you Mark Ahrens for the tip!

Xcode Localization is driving me nuts! Not loading Storyboard

It's been 2 days this issue is driving me nuts.
I'm trying to localize my iOS app but for the life of me I can't get it to work. It works easy enough when I try on a blank project but not on my current project.
I've added the languages in the Localizations using "+", I've localized the storyboard but when I check on simulator or device I still see the english version. And in fact it's not even the English one because if I change the Maintsoryboard (english) I don't see the changes in the device ... I still see the initial texts.
I've tried reseting the simulator, deleted the app, etc. No luck.
I've reverted to a backup tried adding everything again. No luck.
Can someone please help? I know it's not much to go on, but I don't know what to explain to help you help me. So please let me know if I'm missing some info.
FYI, when I look into the app's folder in Developer, I initially don't have a en.lproj when it seems I should have one by default?
It looks like you already figured this out, but I think what probably happened is that originally you had "MainStoryboard.storyboard" as an unlocalized resource. This means that when you build your app, you get a "MainStoryboard.storyboardc" as an unlocalized resource. When you change your storyboard to be localized, you get a "Base.lproj/MainStoryboard.storyboardc" in your bundle resources.
There are several copies of your app when you're building in Xcode. There's the copy on your device or in the simulator, and there's also a copy in your derived data folder in Xcode. When you do an incremental build of your application, the copy in the derived data folder in Xcode is a merge of your new content and your old content. So, when you modify a resource in Xcode, and rebuild, you get the newest resource. However when you rename or delete resources, the old copy is still left in the build directory until you perform a clean operation.
This means that your build product probably had both "MainStoryboard.storyboardc" and "Base.lproj/MainStoryboard.storyboardc". When NSBundle loads resources, it prefers unlocalized content, and would load the old "MainStoryboard.storyboardc".
Be absolutely sure you don't have typos in Main.strings file, e.g. double quotes and semicolons. If you have any typos, device simply ignores localized strings and applies base internationalization.
Blind shot: check that the strings file is UTF-16 (little endian if I remember correctly) and it doesn't have syntax errors (missing ; or quote). Also run a project clean before building after changes in strings files.
Try selecting all of the various .strings, .xib, and .storyboard files that are being localized.
In the File Inspector, make sure that all of the needed localizations are checked for each file.
After adding localization, English was unchecked on several files. Some views were thus localizing into unintended languages. Checking English fixed the problem.
What I faced is only typo error like
"zu0-GQ-ymP.text" = "Meeting End Time;
just make sure and check each strings in Main.strings must be like below
"zu0-GQ-ymP.text" = "Meeting End Time";
Hint : if it is typo error it will not work in particular localization.
this is true - AyAz, thanks! It should be noted, XCode will not always fail to compile if some issues in the strings file (esp for localized Storyboard). you can quickly check the syntax-coloring on the file in xcode or run a strings linter on the strings files to ensure no typos -- in my case it was failing due to a double-quote symbol, which is used in the target localized language as part of their normal alphabet. XCode continued on without warnings/errors, but the screen kept showing English...

Xcode "Use of undeclared identifier" errors, compiles/runs just fine

I've got an incredibly annoying issue that is hampering my workflow. In my project I have "User of undeclared identifier" errors all over. They are all in reference to a single class, specifically a Theme class. I checked for any circular referencing with my imports, none. I'm really confused.
Here is a screenshot of the errors. I would post errors in the Build Log for more detail, but there aren't any. It builds and runs just fine...
I've tried cleaning, deleting the derived data... Any ideas?
I was having the same problem and noticed that all of the undeclared identifiers were declared in files that were in my pch file.
With this in mind I deleted one of the #import lines from the pch file and recompiled which failed as expected. I then put the deleted line back in, recompiled and it compiled normally with all the false errors gone.
Hopefully this simple solution helps a few of you out if the above solutions don't.
These kinds of errors are quite common with Xcode, unfortunately. It would be great if it would auto-refresh its error list all the time, but it doesn't always. When this happens, I strongly suggest that you restart Xcode, which will flush its error cache and hopefully solve your issues.
How are you including this class? In most cases I just include the class explicitly in header and/or body - instead of the *.pch file. Then this error goes away in my case.
Also deleting the derived data workes once in a while. Did you change the location in preferences recently by any chance. I also got this error when I use a ramdisk for derived data and then go back to default. This is the most annoying case - since it causes this error to appear then in almost every file.
This error seems to happen more often in Xcode 4.4 than the prior versions.
Have you included the library files correctly? Take a look at that. Sometimes ARC issues might occur if we don't include the correct file, or something's missing or not connecting UI.
For me the issue was that I created UnityInterface.h/m file to handle the obj-c to c# interface. UnityInterface.h is already defined by Unity. I renamed my own UnityInterface to _UnityInterface and now everything works.
Just posting this for anyone who might have this problem later and doesn't find any of these solutions to work:
If you have any pragma marked #if statements that only execute if the program is in debug mode it will obviously cause anything declared inside of them to not be declared when you try to archive/export.
I had the same problem. Closing and opening XCode didn't help.
I solved it by checking errors in other targets and fixing them (I had tons of errors in my unit testing target). Also I moved header links from h files to m files. But I'm pretty sure, that the first thing was critical.
For others who experienced the same problem and tried all solution above with no result, perhaps you should try something like I did. I solved the problem simply by unplugging my iPhone USB cable from my Mac and then replugged again those cable. After that, rebuilt again and all undeclared identifier errors were gone.
I had the same error. In my case, it was on this line of code:
- (void)playerItemDidReachEnd:(NSNotification *)notification {
// some code
}
My error message said:
Use of undeclared identifier 'playerItemDidReachEnd'
I tried added this line to the .h file:
- (void)playerItemDidReachEnd:(NSNotification *)notification;
I cleaned it, I re-booted my macbook, and I was still getting the error.
Finally, I decided to try to delete the line in the .h file. I then pasted it into a text file, and then copied and pasted it back in to the .h file.
Now I cleaned and VOILA' !!! no more errors. Go figure. This happens sometimes in VBA. Somehow there seems to be unseen formatting in a line of code. So I thought it might be happening with xCode. Cutting it out, pasting into a text file, cutting out of the text file, and pasting it back in right where it was - fixed it in my case.
---- UPDATE -----
The above was posted as my answer. Apologies, apparently there's something else wrong.
After cleaning - my ERRORS were gone. Now I tried to build and run my app. THE ERRORS CAME BACK! So this time I re-created the class files after cutting out all the text, and pasting it into a text file. I did it for both my .m and .h files. But now the errors are back again after trying to run. SORRY. I don't know how to delete this text altogether cuz it is not an answer.
Tried to build and run my app. THE ERRORS CAME BACK!
There was also an error msg that I was missing a bracket ( } ). Finally I looking at the method just before this method, and sure enought it was missing the ending bracket! That was it!
Might be little late in answering.
I had this issue very recently. I fix this by updating my OS and then updating Xcode. I tried updating Xcode alone but did not happen because Xcode 9.4 requires OS High Sierra 10.13.*
Happy Updating :)
It it compile time error
Use of undeclared identifier '<class_name>'
I was run into this issue when developing own framework and app. Objective-C consumer -> Objective-C static framework
Report Navigator had a clear description
umbrella header for module '<module_name>' does not include header '<class_name>.h'
The solution was just to add #import <class_name>.h into umbrella header in a framework target
Try to click Product -> Analyze, after that to Product -> Build. This helped for me.

Where'd my Xcode symbols go?

Some time in the last hour some pretty weird things have been happening with Xcode. There are, apparently, no symbols in my project at all.
Quite the project...
Even alt-clicking on SDK elements (which would typically bring up the quick help side bar) does nothing. Documentation is downloaded.
A world without NSLogs...
Command clicking a class or other object typically sends you to the item's declaration. No such luck for me! All function, classes, methods and pretty much everything but keywords, strings and chars are showing up as plain text within Xcode.
I <3 My IDE Syntax Formatting
Help me get my symbols back!
I've cleaned, I've rebuilt, I've restarted and made sure all the Dwarf settings were right and what not.
Help find the lost symbols!
I haven't experienced your exact issue, but if this happened to me the first thing I'd try is to delete the project derived data using the button in the Organizer, Projects tab, and then restart XCode immediately. Hope this helps.

In Box2d i got 2349 errors when i chang code from one mac to other mac

I am working on Box2d application,
my problem is when i move my application's source code from one mac to another mac i got 2349 Errors, i don't know why i am getting this errors.
i even try removing Box2D source from my application from and add again but doesn't work.
if any one know reason and solution please share with me.
Thanks.
Sounds like you are missing some framework. Posting some of the error messages might help us to help you better!
I found solution to my Question.
i got such errors because of change in name of my projects containing folder.
i.e. my working project was at source path /Bubbles/Boxes
on destination mac i changed it to /Bubbles123/Boxes
i changed Bubbles to Bubbles123 that was the problem, it might be creating problem with path.
it works for me now.
Thanks.