# 49 : Innovation Comes in Many Forms

Published on

Graphics by Vincenz Lee | GadgetMatch

Get weekly handpicked updates on Swift and SwiftUI!

Weekly Comment

Just hours after Apple released the iPhone 16, Huawei introduced the Mate XT at its own product launch, marking the world’s first mass-produced triple-folding smartphone. The device instantly captivated attention with its unique design and intricate mechanical structure.

In recent years, Apple’s iPhone series has undergone minimal aesthetic changes, rendering the Mate XT’s arrival a breath of fresh air, and immediately highlighting an innovation in form factor. However, after the initial excitement subsided, some began to question: Given its high price and the inherent limitations of foldable screens, is the Mate XT merely innovating for the sake of innovation, offering little practical value to the average consumer?

As a company severely affected by sanctions, Huawei has faced substantial challenges. With chip manufacturing capabilities constrained, Huawei’s mobile devices have not matched the computing power and energy efficiency of the world’s leading equipment. In this context, launching products with unique and talk-worthy features is undoubtedly a smart marketing strategy. However, Huawei didn’t just stop with gimmicks; they have pushed the envelope in materials, manufacturing processes, software adaptation, and more, carving out an effective route for innovation despite significant restrictions.

As breakthroughs in manufacturing processes emerge over the next few years, Huawei is poised to reach a level of computing power and energy efficiency on par with leading mainstream brands, complemented by the maturation of its native HarmonyOS and its development ecosystem. At that point, Huawei is likely to further demonstrate its innovative capabilities across various domains, allowing more consumers to directly experience the fruits of innovation.

Turning to Apple, despite the high degree of similarity between recent iPhone generations and only incremental annual performance enhancements, Apple has continued to forge ahead, particularly in imaging capabilities, with a strong emphasis on video. As network speeds have surged and the cost of cloud storage has plummeted, video is increasingly becoming the preferred medium for documenting life and expressing oneself, with the potential to reshape our lifestyle and work modalities. When this transformation reaches a tipping point, the once negligible “micro-innovations” will unleash astounding potential. Apple’s sustained focus on video technology is set to culminate in a landmark innovation, likely as impactful as the original iPhone, which seamlessly integrated an iPod, a browser, and a phone. In time, the emerging technology of spatial video capture and display is expected to solidify its place as another robust component of Apple’s ecosystem.

Innovation manifests in varied forms; some instantly captivate users, while others require time to manifest their true value. Both Huawei and Apple continue to introduce market-acclaimed products, leveraging their respective market conditions, technological reserves, and traditional strengths, showcasing formidable innovation and integration capabilities. In the ever-evolving technological landscape, innovation remains the pivotal force driving progress.

Recent Selections

The weirdest Core Data crash I have seen

Filip Němeček

During the use of Core Data, Filip Němeček encountered an unusual problem: the application would crash whenever attempting to assign a value to a property starting with new. After some investigation, he identified the root of the issue—a rather old setting from Apple’s system: in an Automatic Reference Counting (ARC) environment, properties cannot start with new. Filip documents this discovery in this article and shares relevant information to help other developers save time on this issue.

Although the default implementation of SwiftData is currently based on Core Data, since SwiftData does not declare a separate NSManagedObject subclass for Model, this naming constraint does not apply, and developers are still free to use new as a prefix for property names.

SwiftUI’s Observable macro is not a drop-in replacement for ObservableObject

jesse squires

Due to its more precise response mechanism, the @Observable macro is considered a potential replacement for ObservableObject in the SwiftUI framework. However, differences in their underlying implementation and initialization mechanisms cause significant behavioral differences in some cases. In this article, Jesse Squires delves into how these differences affect app behavior and illustrates potential issues that may arise during use. Additionally, the author discusses problems within SwiftUI’s state management system and suggests adopting a more rational architecture to avoid these issues and help developers optimize their SwiftUI applications.

SwiftData Expressions

Keith Harrison

In its first version, SwiftData lacked the capability to build complex predicates similar to NSExpression. Thanks to the newly introduced #Expression macro, this shortcoming has been improved in iOS 18. In this article, Keith Harrison introduces how to use this new API to build compound predicates for efficient filtering at the database end. Although the #Expression macro theoretically expands the expressive capabilities of SwiftData, the author notes that the use of predicates and expressions still faces some limitations and challenges in practical applications.

Converting an App from Obj-C

Sarah Reichelt

The App Store issues warnings to long-unupdated apps, which can lead to removal if not updated by a given deadline. Sarah Reichelt recently faced this challenge. Her app was originally written in Objective-C, and in this forced update, Reichelt opted to refactor it using the modern SwiftUI framework. In this article, she shares the technical challenges encountered during the conversion process, the solutions adopted, and insights gained from this experience.

Swift Testing: Validate your code using expressive APIs

Antoine van der Lee

The Swift Testing framework, by offering clear and expressive APIs, completely transforms the way tests are written in Swift. This framework simplifies the coding of tests, allowing developers to write and manage tests more intuitively. In this article, Antoine van der Lee introduces this new framework, showing how to simplify test assertions using the global definition and the #expect macro. The author promises to provide a series of in-depth articles in the coming weeks, including how to migrate existing XCTests to Swift Testing.

The Memory Leak: An Xcode Detective Story

Jacob Bartlett

Due to a memory leak issue, Jacob Bartlett’s application encountered a bug where responding to deep links would cause the navigation animation to appear twice. In this article, he details the debugging process, from analyzing the problem to confirming its source, and finally resolving it. Additionally, he discusses Swift’s memory management mechanisms, including strong and weak references, and how reference counting works.

visionOS 2 PortalComponent: A teleportation wonder that better meets expectations

Puffinwalker

PortalComponent creates a visual “portal” in real scenes, through which users can see and interact with different virtual environments or scenes. This feature has been further enhanced in visionOS 2. In this article, Puffinwalker introduces two new modes: Clipping and Crossing, which significantly improve the reality extension effect, allowing models within the Portal to extend more naturally into the outside world.

Weekly Swift & SwiftUI insights, delivered every Monday night. Join developers worldwide.
Easy unsubscribe, zero spam guaranteed