I would like to relase two versions of the same appliaction in different languages. (to be clear - I don't want to release just one app with option to change language but two apps, each one in different language).
The process of app localizationing is described for instance in this tutorial http://www.appcoda.com/ios-programming-tutorial-localization-apps/ but it creates one app with option to change languages.
My question is - is it possible following this method to build (archive) an application in just one language, and then the second one in another?
If not please advise me what would be the best method to do so?
Two exactly the same but separate applications imho - not the best choice!
it means two source code projects, right, with localized separate xibs, stories etc?!
You know why?! Simply because it's difficult to support.
If you need to fix something -> welcome to fix in both projects etc...
You should follow the tutorial and create localized application for two different languages.
I'm assuming to submit both versions to appStore you need to:
When submitting:
set different languages as a default
replace bundle identifier smtl like
com.yourCompany.yourAppName_english/spanish
so you can submit the same application but with different default language.
This is just theoretical... hope it helps
One Language App = No Localization = No need to follow the tutorial
(you just build the app with all NSString with one language)
Your Localized App support more than one language will need to follow the tutorial
Related
I am trying to figure out what would be a good way of setting up application architecture and how to setup Xcode project itself, in the case where I have one base application, and I need to make multiple applications of it where the all apps will have those same base functionalities but will differ in a way that:
Assets may be different
Some features can be added ( new screens that uses new endpoints that are not defined in base app)
Localization can be differ (eg. one app can only be translated to english, and other can support multilanguages)
and probably some more, but you get an idea of what kind of an app (kinda template app) I am referring to.
What would be a preferred way to implement something like this? I guess targets and making a framework for a shared code is one way to go? Or there is something else that would be suitable too?
Target is a good start. Thanks to target memberships, you can "share" storyboards, source files and whatever you want between several targets. Then within each specific target, you add your assets and specific functionalities.
Frameworks can be also a good way to share functionalities between apps. But you can start and try simply with targets, and then later factorize code within frameworks.
The way I would do it could be this way :
Create your project with a single target, let's call it "Blank App"
Develop functionalities and prepare generic assets for this app
When you want to add a new App, duplicate the "Blank App" target, remove membership of default assets, add new ones, add also specific source and resource files, and that's it.
After a few targets, you can spot what can be factorized within frameworks. Add a new framework target, migrate your sources in it, make all apps use this framework, and you'll have a nice system.
I've an app on App store. The old source code is in objective-c, but now I am coding the app in Swift language. I've made a new project. I want to know whether the app store will accept my new source code which is in Swift? If Yes, then what's the procedure. I mean how can I upload the new source code to the app store. Isn't there any issue with bundle identifier or so?
Basically I want to know that can we have one single app with two
different projects in two different programming languages?
Thanks in advance!
Of course you can target two different projects to the same app in iTunes Connect. You just need to set the same bundle identifier in the project. Make sure that you count up the version number or build number like you do for your usual releases.
Best would be to integrate the Objtive-C Code with a bridge to the Swift one,
other then that if you create a new app simply give it the same bundle Identifier with a new build/Version
Android has very good tools for creating different variants of an app (for example, the exact same code but with a different logo). You just create a different flavour and put a different image for each flavour's directory. How do I achieve this in Xcode? The information I have found on the web is very bad. I tried creating a new target for my project but that created a new storyboard, AppDelegate etc. It just created a new app altogether. I want different resource folders for different brands of the app. I'm using Swift.
You're not likely to get the same kind of setup you could have with Android. There are a bunch of features you could use individually or in combination. rmaddy's comments are good. Another option is creating additional schemes and setting the properties of the project for each one. The important thing to keep in mind is that the simplest solution may not look the way you're expecting.
I have Googled this for hours but could find no advice for the following problem (using Swift).
I have seen in many apps an option to select the language from inside the app like this:
(source: unity3d.com)
I would like to achieve something similar, but am having trouble implementing it. I have localized my app and have my Localizable.strings files all set up. I'd imagine it has something to do with storing the language selected in NSUserDefaults, but how can I make the app use the appropriate Localizable.strings file once a language has been chosen? Or is that the wrong way to approach it?
How have others successfully implemented this feature in Swift?
I've already faced this issue on one of my project and found one solution :
When the user select a language from a list, post a NSNotification. All your UIViewController subclass must register to this notification and change the labels value according to the new language selected.
You can use the localized strings in order to set the labels, but NSLocalizedString(...) shouldn't be called since it's relying on the device language which is different from the application language.
You can find my implementation of a custom localisator on Github, available both on Swift and objective-C.
I'm developing an iOS app with Swift 2 and, like most developers, I have a staging and a production environment, with different servers, URL and settings.
I'm looking for a way to quickly switch between the two configurations as I'm developing the app.
On Android I could use build types and flavors to solve this problem.
I've read a lot of guides around the web but all of them were in Obj-C and relied on the macro preprocessor and the #ifdef that was available in Obj-C but isn't in Swift.
There are no clear guides on how to do this in swift and, being a total beginner, I'm not even sure where to start looking.
To recap: what I'm looking for it's a way to switch between two configurations (ex 2 property list files) and to reference the settings contained in those configurations from my code, based on the build I've selected.
You can add a user defined setting in Target's settings with different values for each scheme (Debug, Release, Ad-Hoc, AppStore etc) and use the user defined variable in info.plist file (or as you call it configurations).
Check answer to this question. Although the question is specific to Facebook App Id setup, the answer applies to any generic setting.
Once you have correct data in info.plist you can directly use it in code.