Have you ever found yourself in a situation where you needed to test the networking functionality on your iOS or macOS app over a period of time to see how it reacts? Have you ever found yourself questioning whether or not network conditions during a specific time of day would play an impact on your application's performance or whether it was all just a coincidence? Well, I recently have, and these are real questions that I found myself trying to test and answer with measurable consistent results. Measurable results that will allow me to make the most informed decisions possible on my ne
When Swift was announced back in 2014 I can remember thinking that I needed to make a pivot in my development approach and take all of my Objective-C knowledge and apply it towards developing in the Swift programming language going forward. At first, I thought Swift would be a one-for-one replacement of Objective-C and there would not be much of a difference in the development process other than the syntax.
One of the nice new feature enhancements in Swift 4 this year is Proposal 172 for One-sided Ranges. Proposal 172, in Swift Evolution, now simplifies collection manipulation by giving developers the option to pick from using the verbosity of the start and endIndex or using the newly implemented syntax that infers the start and end index for you.
With the release of Swift 4 next week and the implementation of proposal 168 now up and running in the Swift 4 toolchain I thought it would be nice to get in and get my hands dirty with multi-line string literals to provide some examples on how standard string manipulation practices now work with multi-line string literals in Swift 4. This tutorial will focus on some of the general operations developers use in working with and string manipulation for day to day tasks in development.
If you have ever wondered how to find a substring inside another string in Swift then hopefully this tutorial will help walk you through how to do that. As an example, in Swift 3 or above, if you have ever wondered how to determine if the substring "Agnosticdev," is part of the parent string "Hello Agnosticdev, I love Tutorials," then this tutorial will show you how to indicate, with a boolean value, the existence of the substring.
Looking ahead to the rollout of Swift 4 on Jun 5th at WWDC I have been scanning the Swift Evolution Github page to get a feeling of which of the proposals will make the cut for Swift 4 and which proposals will push ahead to later version of Swift 4.*. One proposal in-particular that caught my attention was proposal 168, for multi-line string literals.
I see a lot of discussion on the internet about the usage of weak, and unowned objects in Swift. Recently, I was involved in a thread on Stack Overflow discussing the proper usage of weak references and it occurred to me that since I see so much discussion about this topic it would be good to write a post detailing my understanding on the usage of weak references.
How and why Swift started at Apple is still a bit of a mystery to the outside world and has been the focal point of many rumors and speculation over the years. If I had to pick one place where there is solid evidence of Swift’s roots at Apple, it would have to be with Chris Lattner. Chris Lattner is the internal founder of the Swift language at Apple, with a claim from Lattner on his personal website that the language dates back to 2010 internally at Apple.
A topic that I have been hearing a lot about lately is the MVVM design pattern. MVVM stands for Mode-View View Model and is intended to solve some of the concerns that have resulted from using the MVC design pattern - specifically in the context of iOS. While MVVM is certainly not an iOS specific design pattern, I did conduct some further research into MVVM using iOS as my research platform because I I wanted to try and figure out if MVVM could be a design pattern that fixes some of the issues that I have run into when developing large MVC iOS applications.