Base Internationalization does now work in Ionic iOS - ios

I have added iOS platform with ionic.
New XCode iOS projects comes with base internationalization but ionic iOS project (Ionic CLI v1.7.16) is not coming with base internationalization:
When I want to add base localization, I cannot be successfull because there is no localization resource:
In fact, there is MainViewController.xib in classes folder but no effect.
How can I use base internationalization with ionic iOS project?

First, you need to go to your storyboard file, open the bar on the right side, and go to Show the File Inspector, the furthest tab to the left. Then, scroll down and click localize. After this, when you check Use Base Localization, you should see the storyboard appear.

Related

Change a launch screen storyboard image based on culture on my Xamarin Forms iOS app

I have followed a number of tutorials on the web to try and make an image on my storyboard launch screen change based on the culture that the iPhone is set to. I can make the text inside the app change so I know the culture is being set correctly, and that I have defined the cultures in the project settings but an image on the launch storyboard always shows the English picture.
My storyboard (created as a Launch Screen in Add, New File) is in the iOS project root and I have a Resources folder which contains folders named en.lproj, fr.lproj and de.lproj. I have an image in each of these folders called Header.png which is slightly different based on the language.
From what I have read, setting the image property of the image control on the storyboard to Header.png should show the english version based on it being my default developer culture (which works - this does happen), then should pick the same image from the relevant folder based on the culture changing and the app re-starting. This isn’t happening unfortunately, it always pulls the english one back.
I have tried putting the storyboard in a Base.lproj folder in the project root, and in a Base.lproj folder in the Resources folder and have tried moving the language folders (de.lproj, etc) out of the Resources folder to the root but none of these seemed to change anything.
I am using the iPhone 6 emulator and am developing in Xamarin studio (latest alpha version)
Does anybody have any suggestions as to where I might be going wrong? I’ve been working on this all day (and last night) and it’s driving me nuts :(
Thanks in advance,
Alan
I believe the setup for launch storyboards / screens differs to the general storyboards you use for your UI.
I have tried localising the images on both a Xamarin project and an Xcode project, neither would localise the image on the launch screen - but once launched the same image would be localised on the main storyboard.
Try creating a separate launch storyboard for each localisation as putting each one in it's respective .lproj folder.
https://developer.xamarin.com/guides/ios/advanced_topics/localization_and_internationalization/#Launch_Images

newest Xcode 7.1 LaunchScreen.xib warning

After Xcode updated to 7.1 I get a warning which says "This file is set to build for a version older than the project deployment target. Functionality may be limited". I am using launch images source not even using launchScreen.xib
The new way of doing splash screens for iOS 8 onwards is to define a LaunchScreen.xib file. This is also available as a new Resource file type in XCode 6.
This new XIB will use AutoLayout and the new size classes to determine how you want to layout your splash screen.
It is not very clear how the backward compatibility of this will work if you want to support older devices. I figure it will not work.
You can set the launch.xib in the target properties first screen in your XCode project.
If you want to use the old way you can still define splash PNGs to use as launch images, that continues to be fully supported. From what I see, this is still the only way to go if you want to support old iOS versions.
open launchScreen.xib file -> Show File Inspector -> in the Interface Builder Document uncheck "Use as Launch Screen"

Cannot localize images in Xcode 6.1

I was reading the iOS 8 series from RayWenderlich.com website.
I came to the localization and internationalization. Read every single bit of it but I could not succeed on localizing images. (I did localized strings with no errors :) )
Here is what I have done:
1- Created a project of Single View Application
2- Placed an UIImageView on the Sotryboard by drag and drop.
3- Added my image to my project (back.png).
4- Assigned my UIImageView to that image (back.png).
Now is the steps for localization:
1- Go to project navigator and select the project.
2- Under localization, "Use Base Internationalization" us checked by default.
3- I added Arabic language.
4- Localized Storyboard files and its .strings and my image (back.png)
I have two image files English and Arabic versions. Each file on its respective folder. See screenshot.
When I run my app on the simulator which has Arabic language installed and selected. My imageView still displays the English version of the image.
I tried to use ar_SA (Arabic, Saudi Arabia) but still same issue. My image is displayed in English.
I have my simulator reset, and I have deleted derived files form library/dev.../xcode... But my app does not care about the Arabic version of the image.
if you want to localize app according to system language it is not happen in iOS 8 because it is a bug.
you can be sure from this point by trying to run the code in the following link.
https://github.com/EmanRezk/Localize.git
change simulator language to arabic in
iphone5s (7.0) then run app you will see the arabic image.
iphone5s (8.1) then run app you will see the english image.
I advice you to localize app according to app language not the system language.

Running first singleview ios application on Xcode

I'm writing a very first program for iOS in Xcode 6 (Single-view application).
I added a label and ran a simulation.
I have seen this label on a simulator. But when i added an additional button on a Main.storyboard's ViewControler and rebuilt the project - the was no any button. It seems like simulator ran first version without the button. How can i launch last version of my project on a simulator?
Thanks.
Xcode 6 run by default with auto layout enabled along with size classes also enabled..
you can check that by disable both of them by going to your storyboard and show file inspector (you'll find it on the right side pane)
And then rerun the app.. if you find the button in its place.. then you should start learn how to use the auto layout cause it's essential now by apple to support any universal app you wish to create in the future .

Xcode 5 upgrade xib to iOS 7

So I am converting my pre-iOS 7 project. When I open it using Xcode 5 and go to individual xib file, it does not ask me to upgrade the xib. I do want to upgrade all xib files.
Should I need to be concerned with this at all?
Updating your .xib files to ios7 is fairly simple, all you have to do is go to your project navigator (blue page that should be at the top of your left sidebar), then click on your project, then click info at the top of the screen. Where you see iOS deployment target, change it to 7.0 (the path is Project manager> project> info> deployment target):
now, you should be able to update your .xib files to ios7. Good luck!
You should not worry about the format of the nib/storyboard formats.
Xcode will upgrade their structure lazily once you actually open them in Xcode 5. This has nothing to do with supporting iOS7, as both upgraded nib files and Xcode 4.X nib files will all use the same iOS7 widgets when the project is compiled against the iOS7 SDK.

Resources