# CocoaHeads ### December 2016 [@danielsaidi](http://twitter.com/danielsaidi)
# Traditional Swedish Korvstoppning ## (a.k.a. cramming)
# Let's go
# 1. Localized Strings
# Not only for localizing ### Gather all your texts in one place
# Rule 1 ### Know the language you localize in
# Rule 2 ### Localized strings are dependencies - keep track of your dependencies
# Demo ### SwiftGen
## Public Service Announcement ### If you use frameworks, alerts etc. - add L10n extensions to your app ###
# 2. Image Assets
# Once again... ### Images are dependencies - keep track of your dependencies
# Demo ### SwiftGen
# 3. Fonts
# Custom fonts can be a wonderful thing
# This is not about using the wrong fonts
# It is about handling fonts incorrectly
# Once again... ### Fonts are dependencies - keep track...we'll you get the point
# Demo ### SwiftGen
# Important! ### Remember to add the fonts in your Info.plist
# 4. Storyboards
# A.k.a. Navigation Driven Development
# One wrong turn..
# Friendly Advice ### Use xibs, but if you stick to storyboards...
# Demo ### SwiftGen
# Summary ### Strings, images, fonts, segues...do not rely on strings that can fail silently
# 5. Dependency Injection
# Brief discussion
# Demo ### Dip
# 6. The Final Dependency
### A lot of talk about dependencies tonight ### The same goes for your choice of IoC ### Do not make it a global dependency
# Demo
# 7. git
# Use it
# That's it
# Friendly advice ### Use git even for the smallest project
# Wanna push?
### Could pay for private GitHub ### SHOULD pay for private GitHub ### ...but there's a cheaper option
# Demo ### Dropbox repo
# 8. Xcode Code Snippets
# Hidden in plain sight
# Demo
# 9. The best method
## Hint: it's not this ``` dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_async(queue, ^{ // SYNCHRONOUS network request // Data processing dispatch_async(dispatch_get_main_queue(), ^{ // UI update }); }); ```
## It's not even this ``` DispatchQueue.main.async { ... } ```
## It is: ``` { asyncStuff() } ~> { mainThreadStuff() } * ``` \* http://ijoshsmith.com/2014/07/05/custom-threading-operator-in-swift/
# Demo
# Let's make it a world standard!
# 10. CocoaPods Acknowledgement
# Be this guy
# Demo
# Thank you!