If I change the language on an iOS 8.1 simulator to anything and try to detect this from code with
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
NSLog(#"Language: %#", language);
I get "en" back. I've tried resetting the navigator, etc. I've tried this using the iOS 7.1 runtime (in Xcode 5.1.1), and it worked fine. Has anyone managed to find a workaround to this problem?
According to the release notes this is a known issue. There is a work around.
If you go to "Edit Scheme..." then the "Options" tab there's an "Application Language" option. This only affects the current run settings, not the app, much like changing the language of the device.
Another dupe of iOS8.1 Simulator always uses US keyboard layout despite german hardware keyboard
Known and documented bug as mentioned in the Xcode 6.1 release notes. File a radar if you want to add your +1 to the complaint list at http://bugreport.apple.com
My simulator is in French language. When I want to check interface in English then changing the iphone language is not enough. I have to switch the region settings minimum two times.
use [[NSLocale availableLocaleIdentifiers]
In my case, editing schema works for region but not for language.
It looks overwrite by development language.
Changing developmentRegion works fine with project.pbxproj like this.
developmentRegion = ja;
Xcode Version 11.3.1 (11C504)
iPhoneX iOS 13.3.1
Related
I know that I repeat this topic but I didn't find the solution. I don't have developer account, I just want to run the iOS simulator with my project. All the uptdates are instaled including iOS simulatores, Compiler for C/C++/Obj-C is set as Default compiler(Apple LLVM 6.1). Also I can't choose any device on the left side of "set the active scheme", there's only iOS Device. I have tried to change the versions of XCode and iOS to earlier and nothing happened. I found
I will be very gratefull for help!
In the Xcode options select Window>Devices and see if the simulators are created. If not, you would need to create simulators depending on which one you need.
I've added a few new translations to my iOS 8 project. If I now let my app run on my simulator, the new translations won't be shown.
After I have changed the language to German and back to English, the new translations appeared.
Is this a normal behavior? What happens if the user download the update from the store?
Just guessing, mind you, but I've seen similar problems only with simulator and never with App Store update over an earlier app version.
Xcode and simulator seem to cache resource files, such as graphics and localisation, and sometimes fail to notice when they have been updated.
You can reset simulator from menu: "iOS Simulator" - "Reset Contents and Settings...", but that will wipe away everything. However now you should get all the latest resource files (which Xcode thinks are the latest).
Sometimes it's enough just to ask Xcode to clean the project and rebuild everything. Note that Xcode menu: Product - Clean is not enough. You have to do Product - Clean Build Folder (press ALT button while menu is open). Sometimes you have to go to menu: Window - Organiser - Projects and delete Derived Data folder.
A clean doesn't work. A reset does neither. What worked was that I've exported the translations, changed something and import it afterwards.
If doing this way, iPhone and simulators both will see the updates.
I test all translations on the device. The simulator is not reliable with respect to translations.
There are many issues in the iOS 8.x simulator runtimes related to CFPreferences, so your app is likely stuck on en_US as its language rather than respecting your settings. Please give the latest iOS 8.3 beta simulator runtime a try as it addresses some of these issues.
TL;DR:
It seems localization does not work with xCode 6.1 and 8.1 simulator.
Workaround:
Go to "edit schemes" >> "Run" (side bar) >> "Options" tab >> "Application Language"
Select the language you wish to run the app on the simulator.
Long Story:
I've updated xCode to 6.1. The update deleted the iOS 7.x simulators and left me only with 8.x simulator.
I've done the following steps:
I've installed the 7.x simulator
Cleaned the project
Deleted the app from the simulators
Deleted the derived folder for my project
The project supports English and Japanese.
on 7.1 simulator (5s) the localization works as expected.
on 8.1 simulator (5s) it does not work.
I'm guessing Apple broke something with the simulator, because it works on real devices.
Any input on this one, anyone else experienced similar problems?
EDIT
It seems like a bug in the simulator, reference:
Apple Dev Forums
This is mentioned in the Xcode 6.1 Release Notes and in other stack overthrow threads, like:
iOS8.1 Simulator always uses US keyboard layout despite german hardware keyboard
I just installed Xcode 6.0.1 (coming from Xcode 5.1.1) and tried to run my iOS app on iPhone 6 simulator for the first time. It builds and runs, but I cannot change its settings. I use NSUserDefaults for my settings. Each time I change settings, go back to the list of settings and then select my app's settings again, they are set according to the default settings.
When I tried to figure out why this could happen I noticed that changing settings of the standard iOS app Maps does not work either. I cannot change the distance setting from miles to kilometers. This happens with fresh iOS Simulator settings (I "Reset Content and Settings" several times) when simulating iPhone 6 and iPhone 6 plus.
Any ideas?
This is a known bug in iOS 8.0 in the simulator. The only workaround at this time is to set the preferences from the command line using the defaults command line tool.
defaults write ˜/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Data/Application/<App UUID>/Library/Preferences/...
You also need to find the relevant UDID.
This appears to have been fixed in Xcode 6.1 so consider updating.
This happened to me, too. It seems that the settings file is not saved at all.
˜/Library/Developer/CoreSimulator/Devices/[GUID]/data/Containers/Data/Application/[GUID]/Library/Preferences
is empty.
I've tried to use plist file from 7.1 simulator, but without any luck.
Downloading iOS 7.1 Simulator through XCode -> Preferences -> Download allowed me to save the settings, but that just for iOS 7.1.
I have an iOS app that worked well on all devices in iOS 6.
I recently upgraded my xcode to version 5.0 and tried to build the same app for iOS 7 on an iPhone 5.
On building the app, the xCode upgraded something in the code settings, but failed to build with errors.
On the iPad XIB, I get an error : "Illegal Configuration : Auto Layout on iOS Versions prior to 6.0".
I tried enabling and disabling the "Use Autolayout" checkbox in the File Inspector, but it didn't work.
Please help me fixing this issue.
Your problem is that the "Deployment Target" for your project is "5.0" and you are using a feature that isn't available for iOS 5.
Check the "General" tab for your build target
and update it to at least 6.0 to use Auto Layout
In your .xib file in Xcode 5, click on the offending control. Go to the properties menu on the right and click on the "File Inspector" tab. It is the tab that looks like a sheet of paper. On that tab, there is a section called "Interface Builder Document". Make sure "Builds for" property is set for "iOS 6.0 and Later". If none of the other fixes above have worked, this is likely your culprit.
There is very simple fix. You have just to uncheck "Use Auto Layout" in General tab.
More information http://shreekantpawar.com/2012/12/20/simple-solution-to-auto-layout-on-ios-versions-prior-to-6-0-error-in-mac-osx-10-7-and-later/
Assuming you are actually targeting only iOS 6.0+, it sounds like an issue related to upgrading Xcode. Sometimes, things can go awry when transitioning to a newer Xcode version.
Here are some general tips you can try:
Clean the project (press Cmd + Shift + K)
Reset the simulator (iOS Simulator menu item -> "Reset Content and Settings")
Restart Xcode
Try building again, hopefully you can now
Autolayout is a feature of iOS6.0 and later, If you need to support iOS 5, don't use auto layout.
https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS6.html#//apple_ref/doc/uid/TP40011812-SW1
Please go through above doc, and check "What's new in iOS6.0" and serach for "Auto layout"
https://discussions.apple.com/message/19879144#19879144
The problem may be because of target version in of your project,it may be 5.0 i guess.There is a solution for this problem
step1.Select your project
step2.select the General tab
step3.change the project deployment target.
I encountered the same problem and checked if any of the deployment target settings are set below IOS 6.0.
All the above mentioned settings were in order showing IOS 7.0 for all of them. So I looked deeper under the settings tab where I found that I have a sub-entry under release that says "Any Architecture" set to 5.5.1. I changed this to IOS 7.0 and that did the job for me.
Just writing it down here in case I need to look for it again in the future.