Swift – Use generics [T] with closures

Let’s make an example to understand better the scope of this tutorial.

You want to:

  • increment all numbers in array by 1
  • double all numbers in array
  • check if the numbers in array are even or odd
  • multiply all numbers in array
  • more and more…

How many functions should you create to do this?

Continue reading Swift – Use generics [T] with closures

XCode – Add a file in project at build time

Imagine that you need to add a file in your XCode project the first time that you build the app.

For instance, you have a configuration file, in Swift, that you want to compile and embed in your app (instead of using a PLIST file that is in CLEAR…) during the build phase and of course use in your project.

Continue reading XCode – Add a file in project at build time