Log userInfo, not localizedDescription, for CoreData errors

Posted by on Oct 12, 2010 in code | No Comments

Most of the Core Data code samples out there log [error localizedDescription] on errors. However, that will return a message that isn’t particularly useful, like: The operation couldn’t be completed. (Cocoa error 1570.) Instead, if you log [error userInfo], you’ll get a much more actionable message, like: { NSLocalizedDescription = “The operation couldnU2019t be completed. […]

Multi-line strings in ObjC localization files

Posted by on Oct 11, 2010 in code | No Comments

I manage my la email templates in localization files for ease of wholesale nba jerseys formatting. When first creating June them, I found lots of documentation on creating single-line strings, but 09 nothing on multiline strings. I could create a single-line string like Perry this: “my-email-template”=”Dear wholesale nfl jerseys %@,nnMessage here.nnSalutation,nnSender”; However, that will quickly […]