SonarQube is an open-source platform that allows you to continuously inspect and measure code quality as you develop your project. It provides static code analysis for code issues, security issues, and code smells in various programming languages, including Swift. This helps development teams maintain and improve code quality by identifying and finding issues in the development lifecycle, if paired with a good testing methodology it can make a difference in your app quality.
Swift is a high-level programming language developed by Apple, which first appeared on June 2, 2014. Swift is vast and complex, containing all the major features we expect in a modern programming language. Generics are one of the most fundamental tools in all of Swift, empowering us to write more abstract, reusable and clean code. With Generics, we can use different data types in the same functions and classes, with minimum assumptions.
Pickers are UI elements, provided by SwiftUI, that enable our users to choose between multiple options while using our iOS app. In this article we’ll have a look at them to see the various types and explore how they’re declared, configured, and styled. Together with SwiftUI buttons, pickers are one of the most used UI elements in iOS apps.
Arrays enable you to group and order elements of the same type, so they play a crucial role in organizing your app’s data. If you’re building an iOS app, arrays are a vital part of your toolkit, and today we’re going to help you understand them. Specifically, we will give you a backend view of how Arrays work and jump into a host of specific operations, from simple filtering and sorting to complex ways of mapping and reducing them.
In iOS, geofencing is a location-based feature that enables us to define geographical boundaries and trigger actions, or alerts, when a device enters or exits those boundaries. This feature has become vital to all kinds of apps, enabling them to deliver personal, timely and contextual experiences.
Unit tests are performed on a single unit of code, usually on a specific function, variable or flow. They allow us to test the components in isolation and validate each single component’s reliability in turn. In this article we’ll introduce the concept of Swift unit testing, and explain, at a high level, why you should carry them out, how you can start developing your iOS apps in a test driven development methodology and how you can write Swift unit test cases.
This is the most fertile time for mobile app development since the launch of the App Store. Our industry is in the grip of several simultaneous revolutions, each of them bending, flexing and moulding to the others. 5G promises to make our apps 10 times faster; wearable technology lets them wrap themselves around our bodies; artificial intelligence enables them to learn from us and get smarter every day. But this torrent of innovation brings challenges, too.
Creating a visually captivating, interactive user interface is fundamental to our work as developers. And SwiftUI, Apple’s declarative UI framework, is a game-changer, providing views, controls and layout structures for the iOS, macOS, watchOS and tvOS operating systems. Of all SwiftUI’s many components, SwiftUI buttons stand out as particularly crucial elements for user interaction.
In Swift there are 3 primary types of collections to store your data in a structured way, namely: In this article we aim to give you an overview of each. Specifically we want to show how they’re declared, illustrate the most common operations of each, provide comparisons between them where applicable and highlight the various performance considerations.