Localization not working until I delete the app


#1

Hi folks,

Not sure what is causing this, but for some reason my app isn’t picking up the tranlated XIB file at all. Not in the Simulator and not on the actual device. Since I thought I messed up somewhere I tried many different things, without any luck.

Today I simply deleted the app from my phone (loosing the data of course) and built it again to debug it on my phone. For some reason it does seem to be working on the phone right now. I will probably have to delete it from within the iPhone simulator as well, so it gets deployed again in the simulator. That would probably solve the problem there too.

Is there any reason for this to happen at all ? Or just some kind of messup fromt he latest XCode ? I asked a few developer friends of mine, and they told me it happened to them without any reason too.

Regards,

Stefaan


#2

It’s a bug with incremental builds in Xcode and has existed since the dawn of Xcode. Sometimes, Xcode just says, “Well, that looks like the same file so I won’t bother copying it.”

The hack to fix this is to do a clean and rebuild. The shortcut for this is Command-Shift-K (or Clean from the Project menu). This trashes the entire build product and when you rebuild it, it is forced to copy everything over.

Of course, if for some reason that doesn’t work, yes, deleting the app does work.


#3

Hi,

Actually the Clean All didn’t even help. Even tried deleting the whole Build folder without any success.

Regards,

Stefaan


#4

The sample code of this chapter doesn’t work on IOS4.

Bignerdranch !!!

Please…correct the problem of this chapter ASAP.

Maybe…the readers will be very confused if you not…


#5

I think that not using multi-tasking is one solution.

Add the following key to Info.plist file and check this value.

UIApplicationExitsOnSuspend

But this isn’t final solution.

Bignerdranch !!!

Please…give the solution using multi-tasking.


#6

Please see viewtopic.php?f=65&t=431.


#7

Maybe, any solution can’t be found there…


#8

I’m also running into this problem. I’ve set the appropriate flags in the info.plist file (called Homepwner-Info.plist) and also ensured that the build was done after clean. (I did a clean-all-targets) as well.

I’m not overly worried about deleting the app to get the localization to work, because chances are if a developer is going to include localization, they’re likely to have it working prior to the release of the app anyway.

Has a solution been found by anyone?