Snapp Mobile iOS Newsletter

Issue 3 • August 16, 2024

Swift

Swift on RISC-V

Swift continues it’s expansion on different platforms. The RISC-V ecosystem is growing at a phenomenal rate and the future will see the introduction of many new exciting and powerful devices. From small soc boards up to large 64 / 128 core workstations and servers. This is a complete swift toolchain for installation and use on riscv64 hardware such as the visionfive2 board.

Get Started with Embedded Swift on ARM and RISC-V Microcontrollers

The Swift working group introduced a repository of example projects that demonstrate how Embedded Swift can be used to develop software on a range of microcontrollers.

Go small with Embedded Swift

This session from WWDC 2024 takes a look on how Embedded Swift runs on a variety of microcontrollers through a demonstration using an off-the-shelf Matter device. Learn how the Embedded Swift subset packs the benefits of Swift into a tiny footprint with no runtime, and discover plenty of resources to start your own Embedded Swift adventure.

Typestate - the new Design Pattern in Swift 5.9

Typestate is a powerful design pattern that emerged in languages with advanced type systems and strict memory ownership models, notably Rust. It is now available to Swift programmers with the introduction of Noncopyable types in Swift 5.9.

Typestate brings the concept of a State Machine into the type system. In this pattern, the state of an object is encoded in its type, and transitions between states are reflected in the type system.

UI

Introducing Entry macro in SwiftUI

The Swift macros feature became very popular last year in the community and inside Apple. As a result, the SwiftUI framework introduced a set of macro types that helped us reduce boilerplates in our codebases. This time Majid Jabrayilov takes a look at the Entry macro type.

Deep Dive into SwiftUI Containers: Key Takeaways from WWDC24

Our very own Volodymyr Voiko wrote an extensive article covering one of the major SwiftUI enhancements that were announced at this year’s WWDC - containter views. Hop on a journey with him as he looks at the new APIs, builds a custom layout from scratch using them and comes with some awesome recommendations on how to optimize it.

AsyncCanvas in SwiftUI

This article illustrates an alternative approach to SwiftUI Canvas rendering—AsyncCanvas. It allows for asynchronous rendering, which can enhance performance and provide a more fluid user experience, especially when handling demanding graphics tasks.

Testing

How to automatically detect memory leaks on CI/CD using UI tests

Back in WWDC21 and with the launch of Xcode 13, Apple introduced a new xcodebuild option that generates a memory graph whenever a UI test measuring XCTMemoryMetrics fails. The flag is called enablePerformanceTestsDiagnostics, is only available in xcodebuild and not in Xcode and only generates memory graphs for failed UI tests when the tests run on a physical device and not on the simulator. Read on to discover more.