Post

Replies

Boosts

Views

Activity

Reply to How do I use "Base" language & "Development Language"?
@eskimo Thanks for the links! Sorry, I've got a couple more questions: So "Development Language" is the language used when the app doesn't support a language the user picked in his settings (as you said, the "fallback"), okay. If the "Base" language is active, the link says that they should be the same but what if the app is meant to be used in e.g. French but also supports English for everyone else? If a user's settings only list English, the app would be displayed in English but wouldn't that mean that the base language (French) and development language (English) are different? In my app, by editing the labels,... in the Interface Builder, I've apparently been writing everything into "Base" (2 files), while "English - Development Language" hasn't got any files connected to it. The second link also mentions specific regions and that if a user specificies e.g. Canadian French (fr_ca), which isn't supported by the app, it'll try to load regular French (fr) instead. But what if the app only supports "fr_ca" and the user uses Swiss French (fr_ch), does that still work (and load "fr_ca") because the app recognizes that they are based on the same language? Tbh, I'm still not sure how the "Base Localization" works exactly. In the images on the first website you linked (and in a lot of older screenshots I found on e.g. Stackexchange) there's always only "English - Development Language" in the list (even with the box below ticked) and, according to that link, base localization adds the files to it. But in my Xcode 12.5 project (and also older test ones) there are 2 different list items: 1. Base and 2. English. I can only get rid of "Base" by unticking the box and then it asks me if I want to move everything into "English", which I already tried yesterday but it gave me an UTF-16 error and didn't do anything. In what case scenario do you actually want to tick the "Base Internationalization" box in Xcode?
May ’21
Reply to How do I use "Base" language & "Development Language"?
@eskimo Sorry for the delayed reply. What I've done so far: I added the second language (French), which added a "strings" file for French for all storyboards. In the File Inspector of the storyboard I ticked "English", which added a "strings" file for English for that specific storyboard. Afterwards I set "developmentRegion = fr;" in the "project.pbxproj" file (set French as development language). This works: If the simulator in Xcode is set to French, the app is French. If the simulator is set to English, the app uses the English translation. If the simulator is set to a different language, e.g. Italian, the app uses French. The rest of the simulated iPhone SE2 was still set to English but that's probably because I only edited the "App Language" in the scheme and didn't set the actual language in the settings. I'm not sure what to do with the "Base" language now. If I change an e.g. button text directly in storyboard, the "strings" files aren't affected, so the changes aren't shown in a simulator of course. If I untick "French", it'll probably be the same as with English before again: I'll only be able to edit the French text directly in storyboard. Unticking "Base" (and moving its contents to "French") didn't work last time around, so not sure what that does. Is there a way to keep the French "strings" files and make it edit them automatically, whenever I edit something in storyboard?
May ’21
Reply to How do I use "Base" language & "Development Language"?
Another question just came up: This link - https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/TestingYourInternationalApp/TestingYourInternationalApp.html#//apple_ref/doc/uid/10000171i-CH7-SW1 says that you can change the language that's displayed in the Interface Builder by choosing the language in the lower right of the Assistant Editor (infos written in 2015). This button doesn't exist in Xcode 12.5, no matter if the Assistant Editor is active or not. How do I change the language for it with the latest Xcode version?
May ’21
Reply to Xcode crashes when I set an aspect ratio in XIB
I didn't set the ratio myself but just dragged one element to the other (tried both ways), while holding down ctrl, then picked "Aspect Ratio" in the dropdown list - no idea how to do it any other way. The UIImageView is a child of the UIView and they both have their "spaces" set to their own superview in the size inspector. The most outer element is a UITableViewCell and I wanted to make IB (it was complaining about a missing constraint) happy by setting the full size like that. Even if there was a zero division, it shouldn't crash but give some type of error message. After the new OS version was done installing I ended up with around 35gb but it was still complaining about not enough free space. I deleted two old SDKs for versions I'd never been using (why is it even keeping/installing that stuff in the first place), which got me to around 43gb and it finally worked. If I'd stopped the download (took the whole day, downloads from Apple's servers are always so slow!), I probably wouldn't have been able to start it again because of the space problem, which happened to me before. I had to call Apple and they helped me clear some cached data. They really have to find a better way to do this, it's a problem every single time and this machine isn't even used for anything else apart from Xcode! When I started it up just now (oh yay, they changed a couple of icons, so worth it!) a new error showed up for 3 of my UIViewControllers: Failed to render and update auto layout status for ViewController.... (ID): Agent crashed Great, I got the same error before the storyboard broke but atm I'm using the old backup one.
Sep ’21
Reply to M1 Xcode 12.5 can't paste clipboard
I just came across this problem: Mac Mini 2020 (M1, macOS 12.6 for now), Xcode 14.2, iOS 13.5 simulator (iPhone SE 1G) I copy text (from a TextEdit text file) either with cmd+c or right-click "copy" but it won't paste into a text field in my app in the simulator: Cmd+v doesn't do anything, the right-click menu doesn't even open and Edit - Paste (menu) is greyed out. Copy and pasting from the simulator to the simulator works and if I copy something from the simulator, then copy something else from the text file and paste in the simulator, it only pastes the simulator text.
Apr ’23
Reply to Is there a problem with this solution for an expandable UITableCell?
@Claude31 You're right, it's better to only reload the previous and the current row of course. Do you know of another way to do what I described? As I said, I haven't come across anyone doing anything like this before (or even anything similar, apart from the phone book apps), which does seem a bit weird.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’21
Reply to How do I use "Base" language & "Development Language"?
@eskimo Thanks for the links! Sorry, I've got a couple more questions: So "Development Language" is the language used when the app doesn't support a language the user picked in his settings (as you said, the "fallback"), okay. If the "Base" language is active, the link says that they should be the same but what if the app is meant to be used in e.g. French but also supports English for everyone else? If a user's settings only list English, the app would be displayed in English but wouldn't that mean that the base language (French) and development language (English) are different? In my app, by editing the labels,... in the Interface Builder, I've apparently been writing everything into "Base" (2 files), while "English - Development Language" hasn't got any files connected to it. The second link also mentions specific regions and that if a user specificies e.g. Canadian French (fr_ca), which isn't supported by the app, it'll try to load regular French (fr) instead. But what if the app only supports "fr_ca" and the user uses Swiss French (fr_ch), does that still work (and load "fr_ca") because the app recognizes that they are based on the same language? Tbh, I'm still not sure how the "Base Localization" works exactly. In the images on the first website you linked (and in a lot of older screenshots I found on e.g. Stackexchange) there's always only "English - Development Language" in the list (even with the box below ticked) and, according to that link, base localization adds the files to it. But in my Xcode 12.5 project (and also older test ones) there are 2 different list items: 1. Base and 2. English. I can only get rid of "Base" by unticking the box and then it asks me if I want to move everything into "English", which I already tried yesterday but it gave me an UTF-16 error and didn't do anything. In what case scenario do you actually want to tick the "Base Internationalization" box in Xcode?
Replies
Boosts
Views
Activity
May ’21
Reply to How do I use "Base" language & "Development Language"?
@eskimo Sorry for the delayed reply. What I've done so far: I added the second language (French), which added a "strings" file for French for all storyboards. In the File Inspector of the storyboard I ticked "English", which added a "strings" file for English for that specific storyboard. Afterwards I set "developmentRegion = fr;" in the "project.pbxproj" file (set French as development language). This works: If the simulator in Xcode is set to French, the app is French. If the simulator is set to English, the app uses the English translation. If the simulator is set to a different language, e.g. Italian, the app uses French. The rest of the simulated iPhone SE2 was still set to English but that's probably because I only edited the "App Language" in the scheme and didn't set the actual language in the settings. I'm not sure what to do with the "Base" language now. If I change an e.g. button text directly in storyboard, the "strings" files aren't affected, so the changes aren't shown in a simulator of course. If I untick "French", it'll probably be the same as with English before again: I'll only be able to edit the French text directly in storyboard. Unticking "Base" (and moving its contents to "French") didn't work last time around, so not sure what that does. Is there a way to keep the French "strings" files and make it edit them automatically, whenever I edit something in storyboard?
Replies
Boosts
Views
Activity
May ’21
Reply to How do I use "Base" language & "Development Language"?
Another question just came up: This link - https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/TestingYourInternationalApp/TestingYourInternationalApp.html#//apple_ref/doc/uid/10000171i-CH7-SW1 says that you can change the language that's displayed in the Interface Builder by choosing the language in the lower right of the Assistant Editor (infos written in 2015). This button doesn't exist in Xcode 12.5, no matter if the Assistant Editor is active or not. How do I change the language for it with the latest Xcode version?
Replies
Boosts
Views
Activity
May ’21
Reply to Xcode crashes when I set an aspect ratio in XIB
I didn't set the ratio myself but just dragged one element to the other (tried both ways), while holding down ctrl, then picked "Aspect Ratio" in the dropdown list - no idea how to do it any other way. The UIImageView is a child of the UIView and they both have their "spaces" set to their own superview in the size inspector. The most outer element is a UITableViewCell and I wanted to make IB (it was complaining about a missing constraint) happy by setting the full size like that. Even if there was a zero division, it shouldn't crash but give some type of error message. After the new OS version was done installing I ended up with around 35gb but it was still complaining about not enough free space. I deleted two old SDKs for versions I'd never been using (why is it even keeping/installing that stuff in the first place), which got me to around 43gb and it finally worked. If I'd stopped the download (took the whole day, downloads from Apple's servers are always so slow!), I probably wouldn't have been able to start it again because of the space problem, which happened to me before. I had to call Apple and they helped me clear some cached data. They really have to find a better way to do this, it's a problem every single time and this machine isn't even used for anything else apart from Xcode! When I started it up just now (oh yay, they changed a couple of icons, so worth it!) a new error showed up for 3 of my UIViewControllers: Failed to render and update auto layout status for ViewController.... (ID): Agent crashed Great, I got the same error before the storyboard broke but atm I'm using the old backup one.
Replies
Boosts
Views
Activity
Sep ’21
Reply to M1 Xcode 12.5 can't paste clipboard
I just came across this problem: Mac Mini 2020 (M1, macOS 12.6 for now), Xcode 14.2, iOS 13.5 simulator (iPhone SE 1G) I copy text (from a TextEdit text file) either with cmd+c or right-click "copy" but it won't paste into a text field in my app in the simulator: Cmd+v doesn't do anything, the right-click menu doesn't even open and Edit - Paste (menu) is greyed out. Copy and pasting from the simulator to the simulator works and if I copy something from the simulator, then copy something else from the text file and paste in the simulator, it only pastes the simulator text.
Replies
Boosts
Views
Activity
Apr ’23
Reply to Device "..." isnt' registered in your developer account
Three days later, I didn't change anything but now it's working. Does it really take 3 days until new UDIDs are added? Is there any way to speed it up?
Replies
Boosts
Views
Activity
Jun ’25