A property wrapper is a generic structure that encapsulates read and write access to the property and adds additional behavior to it. We use it if we need to constrain the available property values, add extra logic to the read/write access (like using databases or user defaults), or add some additional methods. In this article, Toptal Freelance iOS Developer Alexander Gaidukov demonstrates Swift 5.1’s new @propertyWrapper annotation—a more elegant solution.
Swift is great, but what if your application relies on a library that’s written using C++? Luckily Objective-C++ is here to save the day. In this article, Toptal Freelance Swift Developer Josip Bernat integrates C++ code with Swift by using wrapper classes as a bridge and then creates an app that recognizes the Toptal logo using OpenCV.
Handling concurrency in Swift can cause headaches and pyramids of doom. HoneyBee is a futures/promises library that makes concurrent programming easy, expressive, and safe. Join Toptal Swift Developer Alex Lynch in exploring the performance and readability advantage of using this library.
Real-time data-driven apps create new challenges in the way we structure our programs, especially on mobile. In this article, Toptal Freelance iOS Developer Lucas van Dongen implements an iOS chat app, comparing the classic MVC approach with a static immutable MVVM pattern.
With augmented reality on the rise, more and more libraries and tools are developed to tap into that market. Apple recently released ARKit, which shows great promise through power and simplicity of use.
Modern mobile application development requires a well thought-out plan for keeping user data in sync across various devices. This is a thorny problem with many gotchas and pitfalls, but users expect the feature and expect it to work well. For iOS and macOS, Apple provides a robust toolkit, called CloudKit API, which allows developers targeting Apple platforms to solve this synchronization problem. In this article, Toptal Software Engineer Paul Young demonstrate how to use CloudKit to keep a user’s data in sync between multiple clients.
On every new project, you have the privilege of deciding how you’ll architect the app and organize the code. But if you don’t pay attention, or you rush through coding, you risk ending up with spaghetti code. The solution? Use a proper design pattern. In this tutorial, Toptal Software Engineer Dino Bartošak explains how to implement an MVVM design pattern on a demo Swift application.
Most modern programming languages, in the hopes of enhanced maintainability and reusability of code, offer some constructs that help the developer keep the definition of behavior and its implementation separate. Swift takes the idea of interfaces a step further with protocols. With protocols and protocol extensions, Swift allows developers to enforce elaborate conformity rules without compromising the expressiveness of the language. In this article, Toptal Software Engineer Alexander Gaidukov explores Swift protocols and how protocol-oriented programming can improve the maintainability and reusability of your code.
World-class articles, delivered weekly.
Check out your inbox to confirm your invite.
Join the Toptal® community.