localization,xcode6,xliff,info-plist , Localize Info.plist with XLIFF in Xcode 6

Localize Info.plist with XLIFF in Xcode 6


Tag: localization,xcode6,xliff,info-plist


I cannot figure out how to localize the NSLocationWhenInUseUsageDescription key. During export of the base language XLIFF file, Xcode automatically includes CFBundleDisplayName, CFBundleName, CFBundleShortVersionString, and NSHumanReadableCopyright. How can I include additional Info.plist keys? When I try to edit the strings files directly, the added keys are not included in future XLIFF exports.


I am using the new base internationalization and localization tools in Xcode 6. With it, you no longer create or edit .strings files. Rather, choose "Export for Localization" from the "Editor" menu. Xcode will create an XLIFF file with strings from all nibs, code, and Info.plist. You then import a translated XLIFF, which then creates all strings files automatically, including InfoPlist.strings. See Localizing Your App from Apple's documentation.


You need to manually create an InfoPlist.strings file, and add it to the en.lproj folder in the project directory in the Finder. Then drag it into the Xcode project with the other InfoPlist.strings files without copying it.

Please Note:


Coco2dx - Changing To Background Image

I need someone's help. Actually I have no idea what to replace to get a custom background image. I'm just can't do it anymore. -(id) init { // always call "super" init // Apple recommends to re-assign "self" with the "super's" return value if( (self=[super initWithColor:ccc4(219,31,94, 999)]) ) { ws=[[CCDirector...

ToLower vs ToLowerInvariant

I'm just looking for any example that this two methods produces different results. First of all, I visit msdn page, and run code from it with minor changes using System; using System.Globalization; using System.Linq; class Program { static void Main() { string[] words = { "Tuesday", "Salı", "Вторник", "Mardi", "Τρίτη",...

Could not find '+' that accepts the supplied arguments

I am trying to make a monthly Loan payment calculator here is the code for it: import UIKit class monthlypayment: UIViewController { @IBOutlet weak var loanamounttextfield: UITextField! @IBOutlet weak var numberofmonthstextfield: UITextField! @IBOutlet weak var loanpercentagetextfield: UITextField! @IBOutlet weak var answerlabel: UILabel! @IBAction func calculate(sender: AnyObject) { var loanamounttext =...

How to display any coordinate on indoor floor plan? [closed]

I am using iBeacons for indoor positioning system and my algorithm generates user's 2D coordinate at any point in floor plan. I need to display this coordinate on screen of iOS device as a footprint. I got some ideas from Footprint (Apple) but couldn't figure out the exact way to...

How can Create Model class in swift and get values form model class in another class [closed]

How can i create model class in Swift. I am getting errors wile accessing values form the model class. Thank you. Here I am attaching my demo project, U can download it

Xcode: Issue adding localization to my project (Resource file / Reference language not found)

I'm trying to add a Spanish version for my app. I'm following several tutorials and they all get me to this point: Screenshot from http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014 But when I try doing the same thing step by step in my existing project, I don't see any files to choose from: What do...

UITableView Customize Cell

I am trying ti implement table view cell with customization in that case i need to make a dynamic Heights in specific cell not at all. show is this possible to define dynamic height for uictableview cell and if yes the how can i perform this operation ? Thank You....

prepareForSegue UICollectionView not working (swift)

I’ve tried to push segue by using UICollectionView (show image form MasterView to DeatilView) but is not working. Xcode also doesn’t show any error message. What’s wrong with my code. I need some advice. override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "showDetail" { if let indexPath =...

Set RootViewController in UIViewController

Currently i working on iOS App and my requirement is to set TabbarController as a root view controller in all the upcoming features ViewController. so anyone can please suggest me how it possible ? This my TabBarController and this was Viewcontroller for Edit Profile which is outside viewcontroller means not...

Info.plist not in correct format

I was working through my iOS Xcode project just fine, and then all of a sudden when I tried to run it, I started getting the error below: error: couldn't parse contents of '/Users/pavitarsidhu/Desktop/AmigoDash/SidebarDemo/AmigoDash-Info.plist': The data couldn’t be read because it isn’t in the correct format. I'm really confused. I've...

What is the proper way to search for regions in CoreLocation with Swift?

I've been working with a number of tutorials and continuously have the exact same issue with each of them. When I run the following code or other incarnations of it in other tutorials, I keep getting: 2015-06-12 13:50:33.797 Scanner[4599:2593734] *** Assertion failure in -[CLLocationManager startRangingBeaconsInRegion:], /SourceCache/CoreLocationFramework/CoreLocation-1756.0.20/Framework/CoreLocation/CLLocationManager.m:1129 2015-06-12 13:50:33.798 Scanner[4599:2593734] ***...

How to always show debug window in XCode6

I'm having trouble keeping my debug window open in XCode6. Every time I run the code the debug window disappears. I then have to press CMD SHIFT Y to show it again or use the upper right window icon. How do I make the debugger window stay at all times?

Loading of Java message properties for internalization

I have the following Java i18n Message class.: public class Messages { private static final String BUNDLE_NAME = "languages.message"; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); private Messages() { } public static String getI18n(String key) { try { return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key +...

UIPopoverController arrow not the same white as my UINavigationBar

So the problem that I have is my UIPopoverController's arrow is a different color to my UINavigationBar color. If you look at the image there is a slight shadow on the white and you can see it is not the same white: This only happens on iOS 8 and not...

How to make a view with picker and toolbar stay at the bottom of iphone screen

I am using this code and its placing my view at the top of the viewing area instead of the bottom. Any idea what I am doing wrong? I am not creating the view in swift because I already have it created in IB with a toolbar and pickerview inside...

WPF Localization: DynamicResource with StringFormat?

I am doing localization in .NET 4 with a ResourceDictionary. Does anyone have a solution for using a value with string format? For instance, let's say I have a value with the key "SomeKey": <ResourceDictionary ...> <s:String x:Key="SomeKey">You ran {0} miles</s:String> </ResourceDictionary> Using it in a TextBlock: <TextBlock Text="{DynamicResource SomeKey}"...

Expected declaration error when adding subview

Hi I got a "Expected declaration" error when I tried to add a subview to my UIView, here's the code: @IBDesignable class TimePickerView: UIView { /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. override func drawRect(rect: CGRect) { //...

iOS : pod update (unable to find the utility “xcode-select”)

xI am a new iOS developer. Recently when I ran "pod update" sth just went wrong see the detail in the following: (unable to find the utility "xcode-select") bash-3.2$ pod install Analyzing dependencies sh: line 1: 4936 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find xcode-select 2> /dev/null xcrun: error: unable...

Getting a Expected identifier or '(' issue in Xcode 6.1

I'm quite new to C. I've tried other links but no dice. I'm using Xcode 6.1 and I get the following issues: Parse Issue: Expected identifier or '(' Semantic Issue: Unexpected type name 'map' Here's my code: //hashmap.h #ifndef __HashMap__hashmap__ #define __HashMap__hashmap__ void map_init(); void map_insert(uint8_t, uint8_t); uint8_t map_getVal(uint8_t); #endif...

Build error after I localized Info.plist

I localized Info.plist : And I got this build error : error: could not read data from '/Users/cherif/Apps/Wesh/Info.plist': The file “Info.plist” couldn’t be opened because there is no such file. Actually there are now two Info.plist files : fr.lproj/Info.plist Base.lproj/Info.plist How to localize the Info.plist path ?...

Warning when presenting UIActivityViewController

When i present an UIActivityController using the code below i get, it is presented but the console shows "Warning: Attempt to present <UIActivityViewController: 0x7f8788e7aed0> on <MyApp.CustomTableViewController: 0x7f8788e3db60> which is already presenting (null)". @IBAction func shareImage(sender: AnyObject) { let images: [UIImage] = [image.image!] let activityViewController = UIActivityViewController(activityItems: images, applicationActivities: nil) self.presentViewController(activityViewController,...

How can I open an Image in a default Image Viewer by providing the path of the file?

In my project if a user clicks on an Image I will get the path with file name of the Image. I need to open the Image in a default Image Viewer of iPhone. Thanks in advance...

Fix iOS ipa file (missing code-signing certificate)

I'm able to compile and deploy my iPad app to my iPad device with no problems. But when I use Apple's Application Loader program to submit the ipa to iTunes Connect, I always get this error: Invalid Provisioning Profile and Missing code-signing certificate. Is there any way with xcode or...

Swift - How to disable a button after being clicked 3 times in a row?

I have a button in a viewcontroller. I need to make it so the button is disabled if clicked 3 times in a row. Then if the user clicks on any other button (or meets another condition), the button should be enabled again.

Why does the window background remain black in fullscreen?

I have created a window without title by- override func windowDidLoad() { super.windowDidLoad() self.window?.styleMask = NSBorderlessWindowMask self.window?.movableByWindowBackground = true } I have set canBecomeKeyWindow by- override var canBecomeKeyWindow:Bool { get{ return true } } I have changed the background color of container view by- override func drawRect(dirtyRect: NSRect) { super.drawRect(dirtyRect)...

sizeWithFont does not get marked as deprecated when working with array, it is safe then?

If I write it as follows no deprecation alert shows up: NSArray *aboutInfo=[NSArray arrayWithObject:@"blah"]; CGSize textSize = [[aboutInfo objectAtIndex:0] sizeWithFont:[UIFont systemFontOfSize: 14.0] constrainedToSize:wSz2xh lineBreakMode:NSLineBreakByWordWrapping ]; However this is marked as deprecated: NSString *[email protected]"blah"; CGSize textSize = [aboutInfo sizeWithFont:[UIFont systemFontOfSize: 14.0] constrainedToSize:wSz2xh lineBreakMode:NSLineBreakByWordWrapping ]; Both work fine. Would that mean that...

GeneratorOf Cannot find an initializer Error

My attempts to understand Generators and Sequences lead me to an idea to implement a Fibonacci sequence. This works perfect: struct FibonacciGenerator : GeneratorType { typealias Element = Int var current = 0, nextValue = 1 mutating func next() -> Int? { let ret = current current = nextValue nextValue...

Swift: NSDate losing sub-Second precision after loading

I have a 2-dimensional array of NSDates, working at sub-second precision. But when I save the array like this: let pathes = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) as NSArray let documentsDirectory = pathes.objectAtIndex(0) as! NSString let path = documentsDirectory.stringByAppendingPathComponent("tj_001.plist") var dicti = NSMutableDictionary() dicti.setObject(tDate, forKey: "tTimes") dicti.writeToFile(path, atomically: false) and load it...

Getting nil values in Swift when i create new Instance to the class

I am getting problem in swift with the creating new instance to the class. I am setting a dictionary to HttpVo class in the httpUtils but unable to get that dictionay in other place by creating new instance to the same class. Thanks This is my demo project you can...

Apple Health Kit Error Domain=com.apple.healthkit Code=5 “Authorization not determined”

I have determined authorization before actually trying to save any data or do anything with it. The error is happening at the moment of query: HKSampleQuery *query = [[HKSampleQuery alloc] initWithSampleType:foodType predicate:predicate limit:HKObjectQueryNoLimit sortDescriptors:nil resultsHandler:^(HKSampleQuery *query, NSArray *results, NSError *error){ ... } Yes, I have read apple documentation that says:...

How to parse non-standard month names with DateTimeFormatter

I need to parse (German) dates that come in the following form: 10. Jan. 18:14 8. Feb. 19:02 1. Mär. 19:40 4. Apr. 18:55 2. Mai 21:55 5. Juni 08:25 5. Juli 20:09 1. Aug. 13:42 [...] As you can see, the month names are cut if the month has...

Delete row in TableView and remove the core data - iOS / Swift

I am having an issue with my swift app. I am trying to implement the swipe feature that will prompt the user with the "DELETE" option. As of right now my code only allows me to swipe but the delete button is not being generated. I am currently using Xcode...

Loading HTML Video With jQuery not working anymore

Here is the Development site: legiondesigns.com/pauls And I also posted a previous question here Loading HTML Video With jQuery and that was working for a few days then it just stopped working. I am using WordPress 4.2.2 so I know that I have to use "wp_localize_script" which I have done....

Resource file not being picked up when using ASP.NET expression

I'm trying to use resource files in an ASP.NET Web Forms application (.NET 4.0). I'm using VS2012. I have the following files inside the App_GlobalResources folder: Address.resx (default language, English) Address.ja-JP.resx (Japanese) The problem is when I'm trying to display the text in Japanese in an ASP.NET page (*.aspx file)....

Change placeholder value depending on locale - angularJS

Does angular localization provide this: Can the placeholder value change depending on the locale? I have an input control with placeholder="mm/dd/yyyy". It should change to placeholder="TT/MM/JJJJ" for German. Should we write a filter for this? or Angular locale provides it? Thanks in advance. ...

Swift - UIImageview URL slideshow

Hello everyone I have a problem I can not solve , I have an application written in Object C and I wanted to make it or rewrite it or compatible with Swift . Being novice with Swift would like to know how I can set this piece of code written...

How to calculate values based on neighbouring rows in UITableView

I have an Xcode Swift application that is using a UITableView to display a list of results. Each row has a value which is calculated to be the difference of a value in the next row. When the data loads, all is good. However I noticed that, as I have...

Load images from “HTTPS” type of url and display in UIImageview

I am developing an iOS app in which I receive "HTTPS" URLs from server for images. I am now unable to load images from those URLs. I have tried several frameworks like AFNetworking, SDImageView, etc. But none of them are able to load image from these type of URLs. Update:...

Property 'package_number_7' not found on object of type 'User *' after Lightweight Migration

I have a CoreData based application. In my data model I've changed data model just by add to User entity row "package_number_7" and use Lightwight Migration (just adjust appdelegate) .. Now when I want to use this "package_number_7" in fetch request it's not working. here is sample code from viewcontroller...

Loading multiple saved images in app slows it down

I am developing an app where user can save 13 screenshots and display them on a single view as thumbnails or as a full screen image. let fileName:String = self.stickerUsed + ".png" var arrayPaths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as NSString var pngFileName = arrayPaths.stringByAppendingPathComponent(fileName) UIImagePNGRepresentation(screenshot).writeToFile(pngFileName, atomically:true) NSUserDefaults.standardUserDefaults().setObject(fileName, forKey: self.stickerUsed)...

PresentViewController Troubleshooting

In my swift app I am trying to make it so that a button tap switches view controllers. This is the code I am using: presentViewController(pythTheoremViewController.self, animated: true, completion: nil) This returns the error "Cannot invoke 'presentViewController' with an argument list of type')pythTheoremViewController.Type, animated: Bool, completion: nil) What does this...

create a popup window with just a textview/string and a button SWIFT ios 8

I am very new to ios 8 and swift but I have not found a way to make a simple popup window whenever a button is pushed. I payed for tutorials and they still don't cover it. All i would like is for when the user pushes a button (the...

Mach-o Linker Error

I can't build my project because I keep getting this error. As I understood it deals with the constant tagShift I'm using in my code. I would appreciate if anyone could help me to solve this issue

Dealing with graphical assets for iPhone 5/5S/6/6 Plus

Since the induction of 6 and 6 plus its the first time I'm starting to work on a new app. Now I'm a bit confused about the use of graphical assets for my app. See for 5/5S things were pretty simple. If I have to make an image view of...

Pods project with App Extension started failing to build

I was working on my app, haven't changed any setting or pod, and I tried to archive a build after about two weeks, and it failed. Then I tried to debug build (normal Cmd+R) and it failed with the error: ld: library not found for -lPods-AFNetworking I've tried pod install...

Xcode 6 crashes on submitting Archive

Today I uploaded my first build of first app successfully to App Store for beta testing. After making a few changes, when I tried to submit the new archive again Xcode crashed, and still crashes. It's the log: Process: Xcode [36810] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 6.3.2 (7718) Build Info:...

How can I show Google maps into a WebView?

When I click the button my app shows a map: it opens the google map perfectly in the browser safari. Now I just want to show the map into a WebView, how can I do it please? Here is the code I use to show the map: @IBAction func newAction(sender:...

How to subclass different View Controllers in Swift

How do I subclass different view controllers? This is what I've been trying to use: class secondViewController: UIViewController { This returns the error "Use of undeclared type UIViewController." What am I doing wrong? I have started this class in a new .swift file, is that somehow contributing to the problem?...

UITableview with more than One Custom Cells with Swift

As absolute beginner I have to ask those questions: I want to use a UItableview with different custom TableviewCells. One Cell should have an image and a label. Another cell should have two label. A third cell should have a dayPicker. I don't have to create Tage cell in the...

Activity indicator starts before function is called

I have a button that calls this IBAction function. The activity indicator starts as soon as the app runs instead of when the button is tapped, disappears as expected when the function completes its work then never appears again. This seems like a really simple interface thing but I'm stumped....