It seems that my project has somehow acquired two folders for English resources: /English.lproj and /Classes/en.lproj. Obviously this seems wrong, and although it works when devise is set to English, I suspect that it causes a crashing issue when the device is set for non.English language (app can't find the default resources - My app crashes in other languages. Xibs seem to not be loaded. Why?)
So how does one go about fixing this? Apparently I can't just move the files. XCode misses the old ones, and can't find the new ones.
I found a solution. Basically copy the files, remove references, make new references, delete old files.
Detailed description here:
My app crashes in other languages. Xibs seem to not be loaded. Why?
Related
I am facing a very obscure issue.
I've got an app that needs to be localized in three Languages, English, French, German. There's multiple localization files as I've got multiple storyboards ( each storyboard has one for each language).
Everything works great and things translate properly except for ONE file in ONE storyboard in ONE language. So this specific storyboard I call "Authentication" works for all languages except for the German one.
I've checked. the file is:
included in all targets
is also found in Build Phases copy phase
has the correct name.
has the correct formatting (in fact i am not allowed to build at all if the formatting is not correct in this version of Xcode.)
I am out of ideas and resorting to asking here to see if theres anything i might be missing in my series of checks.
Thanks all
SOLVED.
The answer lies within my third point
has the correct formatting (in fact i am not allowed to build at all
if the formatting is not correct in this version of Xcode.)
Beware everyone. This might seem like it is the case but it does not apply to everything. If there's a syntactic error in the Localizable.strings file, xcode will let you know and refuse to build.
HOWEVER if there's a syntax error in the YourStoryboard.strings file, the process of building will go on UNHINDERED.
Since an issue in syntax was halting everything for Localizable.strings i was wrongfully assuming that such a check would take place for all translation files. It doesnt!
Hope this saves someone in the future
I wanted to release an app I worked on and quickly change the project name. I usually duplicate projects before doing things like this but this time - because this procedure always worked on Xcode as I found it way more reliable than e.g. Eclipse - I didn't, which I immediately regretted.
Opened Xcode again and now I am seeing this
I guess all the linking is gone now which is why Xcode doesn't "find" the files anymore. Renaming the remaining project stem to the old name gives
couldn’t be moved to because an item with the
same name already exists
and also manual renaming of folders won't work as the .xcodeproj is gone.
The project is written in Objective-C, and all the classes are still persistent, but the effort of adding all the xib's, referencing the outlets, setting architectures, etc will become the nightmare of my life. I do have a half-way recent backup but everything I did to make the app store-ready today will be gone.
Any ideas on how to rescue my project?
EDIT: What Xcode is now showing on the welcome screen is a project called "project" (literally) and it has the usual compass icon but with a white instead of a blue background referring to the path <project folder>/<new project name>/ and below that "white" project there is a folder icon with the new name pointing to <project folder>.
I also made a snapshot before, of course it now says "Unable to read snapshots" in the "restore from snapshots" window.
Ok what I now did is renaming ALL references from the old project name to the new one. I even changed file names. I used Xcode's CMD+SHIFT+F and TextWrangler's "replace" function and thankfully I still had the .xcodeproj from yesterday's backup so from there I could copy it into the new project and rename stuff. There are still some things that don't work perfectly, for example auto layout doesn't "stretch" contents over the screen (it stays on iPhone 4s size, even on 6 plus simulator), I needed to set the scheme again and Launch Images / Icons got lost but I can look over that. The only thing I am afraid of now is that the final build might miss out a symbol or something like that so I eventually have a corrupt file in the App Store, but man it's a beta version, how much worse can it get anyway?
Thanks to everyone recommending me to even backup the broken project, I did this even before you said it but because I think it's a valuable advice I wanted to put it in my answer as well.
It's a shame that stuff like this can happen, I've been backing up my work on a daily basis and my project never got corrupted - until now.
I have searched now quite a bit on Stackoverflow for an answer, but I can't seem to find an adequate one.
So, I am localizing an App with XCode. Everything works fine, I have localized a storyboard and everything. The last part which needs to be localized are the labels and buttons in XIB Files. Here I have the following Problem:
XCode Offers me to create localized Xib Files for every language or to create strings files. Both options are fine with me, but none seems to work. One answer to a similar question stated that this does not work my design. If so, why does XCode give me the option to do it in the first place? And, what is a good and easy solution for this?
And I am using Swift, not sure if that really matters, I just thought I mention it.
There is a known issue with recent versions of Xcode where the simulator would not correctly pass the language information to the app, so it seemed as if localization was not working. If that is your problem, there are two workarounds:
try your app on a device and confirm switching the language brings up your localized strings.
force the language via your build scheme (Product => Scheme => Edit Scheme... => Run => Application Language)
First of all, I've never worked on iOS, so this may or may not be a stupid question, I don't know :)
I have an iOS App, and I need to run it.
In the 'Project Navigator' I have a folder/package called 'Reuse and Platform Libraries'. Inside, I have another four folders but 3 of them seem like missing.
I am not sure if this is the case. I've tried googling their name but without results so I assume they are not some open source libraries.
Can someone clear this up for me? Do I need to install some XCode packages?
Thanks!
I suggest you search the folder of the project for those files, sometimes when copying a project the paths get screwed up because they were set as absolute paths and not relative paths.
If you can't find the files, it's most likely that the library is a private one used by the previous developers, and usually kept out of the project folder so they probably forgot to send it along. I'd suggest simply asking them to send the files over :).
There is also a slight chance they are not needed to run the file, in which case, just deleting them from the sidebar should make the project run.
I'm trying to localize an ios app after it was launched.
We should be able to select the desired language on the startup screen.
The app is already localized and available for 13 languages.
The only solution I found is to set the locale and relaunch the app, but we can't really do that, as it's not user friendly, and Apple will probably reject it.
The project contains most of a thousand of xib files, so I can't change all the resources "manually" either.
Is there any solution to reload the UIApplication ? Or an other trick to change the locale on the fly (and allowed by Apple) ?
I found lots of threads which were talking about this, but none very interesting compared to the scale of the project.
I don't think there is a way to do what you want without coming up with a custom solution. I found a solution on StackOverflow here where a user created his own localization solution.