In the last couple of months I have found myself in situations where I have needed to diagnose transport security issues from from the context of an iOS application. This often can be difficult from the client side perspective as you may not know anything about the minimum TLS version, preferred cipher suite, or the certificate in use on the server. Often, the best move you have, if you do not have a direct line to the server side team, is to test different settings to diagnose what works and what does not.
If you are like me and have ever found yourself wondering, "what is the exact syntax on how completion handlers are setup in closures?" Then this tutorial is for you. I wrote this tutorial with the idea in mind that sometimes it is nice to have a resource to reference when writing and defining completion handlers in your Swift project. I also wanted to provide a quick reference on how to setup a completion handler as a function and as declared constant. So all you have to do is make the decision about what makes the most sense in your project.
Have you ever found yourself trying to remember the syntax on how to grab the first few characters from the start or end a string in Swift 4. Well, I certainly have from time to time and that is why I wanted to write this tutorial. To show you the reader how to grab the first few characters from the start or the end of a Swift string using only two Swift Standard library methods, and from there show one more slightly advanced technique. So by the end of this tutorial you should be able to get the first few characters from the start or the end of a string in either Swift 3 or 4.
If you are like me and sometimes you forget the syntax on how to sort a list of custom objects by property then this tutorial is for you. It seems like there is always a need to sort and manipulate custom objects by property and that was my why I wanted to write this tutorial. To demonstrate how to take a custom list of objects and sort those objects by a specific property. In the case of this tutorial I have chosen to use a date property because sorting by date is a very real world example of something you may run into in the work place, but the same code would also work for numbers or