Old Driver iOS Weekly #253 | 2023-07-24

Original link: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23253

ios-weekly

The old driver’s iOS weekly report only presents valuable information for you.

You can also contribute to this project. If you find valuable information, articles, tools, etc., you can submit them to us in Issues , and we will deal with them as soon as possible. Remember to write down the reason for the recommendation. Suggestions and comments are also welcome to Issues .

news

Unity support for visionOS: What you need to know

The Beta version of Unity’s visionOS support has released an application link , and interested students can apply by themselves.

WWDC23 internal reference has also released a lot of related content, if you are interested, you can check it yourself:

“WWDC23 Internal Reference”

This week we updated 6 more internal reference articles, each of which is of very high quality. Due to space constraints, we recommend three articles at the beginning that may be more interesting to you, and put the rest at the end of the weekly report~

? WWDC23 10164 – What’s new in Swift

Winter Melon: This Session involves the new syntax features of Swift and the topic of Swift Macro. These features are of great help in writing more flexible and robust APIs and high-quality code. It also digs into the advantages of using Swift in constrained environments, and discusses Swift’s flexibility in adapting to multiple platform devices and languages.

? WWDC23 10167 – First look at Swift macros

Ark (WAMaker): Swift macros are a new feature of Swift 5.9 this year. This article focuses on the introduction of the basic concepts of Swift macros and what needs to be paid attention to in use.

? WWDC23 10117 – What’s New in App Store Connect

iHTCboy: This article describes the new features of App Store Connect, including privacy protection, new data types, pre-orders by region, product page optimization, and automation through API. Among them, the TestFlight test, which is only accessible to internal testers, is safe and controllable earlier; pre-orders by region can expand new markets for existing apps; the automation process is realized through API to save time. Finally, it is recommended that developers try new features as soon as possible, optimize product pages, arouse users’ interest, and acquire more users.

article

? Talking about Bazel and Gradle build system from Android perspective

@Crazy : From the perspective of building system comparison, this article compares the differences between Bazel and Gradle from various angles. First of all, it compares the concepts and compares the differences between Bazel and Gradle products, thus leading to the comparison of the concurrency capabilities of the two, and concludes that the implementation of Bazel in terms of concurrency capabilities is simpler and more convenient. Then, from the rapid incremental comparison, the difference in DAG design between the two is drawn. Bazel’s DAG design is better than Gradle’s design in the incremental and configuration stages. Finally, there is a comparison between distributed compilation and dependency management. Bazel’s distributed compilation is its core capability, but for Java/Android compilation, distributed compilation has no significant improvement, while Gradle has an advantage in Java/Android dependency management. At the end, the author compared the two builds of Feishu. The advantage of compiling Gradle for the first time is extremely obvious, and compiling with cache is not far behind Bazel. The author maintains an objective attitude as much as possible throughout the article, making a comparison between Bazel and Gradle, providing you with a choice of ideas, and it is worth reading the article.

? How to Use Swift Package Manager to Save Gigabytes of Network Traffic and Disk Space

@Smalfly : This post describes how to use the Swift Package Manager (SPM) to store dependencies in your project’s codebase. This avoids re-downloading and resolving dependencies every time you switch branches. The author created a local package and copied the minimum required files into the project through a script. Doing so reduces file size and optimizes usage of dependencies. In the end, the size of the copied file directory is only 4.7 MB, which is 211 times smaller than the .build directory. The article provides the sample code of the implementation, if you are interested, please refer to the original text.

? Bad practice: testing if a String is empty

@JonyFang : This article mainly discusses the problem of detecting whether a string is empty by using string.count > 0 in Swift, and proposes a better alternative.

The problem with using string.count > 0 is that the count property needs to traverse the entire string to count the number of visible characters, so for long strings or cases containing a large number of strings, the execution time will be very long. If you want to execute fast and not be affected by the length of the string, you can use string.isEmpty to detect whether the string is empty. The difference is that string.isEmpty only needs to check if the string contains at least one character.

In the daily development process, try to avoid long strings being judged as empty by count > 0 to avoid unnecessary performance loss.

? Convenience Property Wrappers vs Custom Data Access Layer in SwiftUI

@AidenRao : The author takes a to-do application as an example to analyze the advantages and disadvantages of using SwiftUI’s @Query property wrapper and custom data access layer. If you are looking for convenience, you can choose @Query attribute wrapper; if you need more flexibility to replace the data access layer in the future, then a custom data access layer is more appropriate.

tool

Developer Duck AI for Xcode

@EyreFree : Developer Duck is an artificial intelligence programming assistant that helps with programming tasks including code suggestions, analysis, and refactoring.

The following functions & features are supported:

  • Xcode integration and chat window
  • command line support
  • Supports 15 programming languages ​​including Swift
  • Add documentation comments to files
  • Paste blocks of code and quickly refactor
  • Generate MermaidJS flowchart through chat

Interested friends can try it.

the code

? DeckKit

@Bang Ben : DeckKit is an open source library designed to help developers create card-based (Deck) applications in SwiftUI. DeckKit can customize the appearance and behavior of cards, and provides some convenient functions, such as card rearrangement, card dragging and so on.

  • Create and manage cards
  • Customize the appearance and behavior of cards
  • Support card dragging, rearrangement and other interactions
  • Provide Demo application for reference

design

? Invisible Details of Interaction Design

@水水: Good interaction design will make the product feel like a natural extension of our own behavior. How to achieve an overall balance between form and function, and how to allow users to predict product interaction intentions based on context? This article uses some interaction designs of iOS to introduce how excellent interaction design is a metaphor for user operations. Friends who are interested in interaction or design may take a look, maybe they will gain something~

WWDC23 internal reference update

? WWDC23 10156 & 10157 – SwiftUI Animation

zddhub (Zhang Dongdong): This article starts with the basic knowledge of SwiftUI animation, and gradually analyzes the three core components that support SwiftUI animation effects: Animation, Animatable and Transaction. At the same time, combined with SwiftUI’s view rendering mechanism, it aims to help readers understand and effectively apply SwiftUI’s animation functions. At the end of the article, we will introduce two new advanced animation features added to SwiftUI. Let’s start a journey of exploration together!

? WWDC23 10122 – Exploring Media Formats for the Modern Web

Summer: This article describes the media formats supported by Safari, including images and video, and introduces new technologies in Safari 17. The article also discusses the evolution of website video and the latest technology Managed Media Source API, which enables adaptive streaming video, provides better control and more efficient performance.

? WWDC23 10053 – What’s new in privacy

Hummer: This article provides an overview of Apple’s privacy efforts over the past year. It mainly covers three directions:

  • 1. New tools and APIs designed with privacy in mind;
  • 2. Updates related to privacy on each platform;
  • 3. Privacy-preserving design paradigm for the Vision Pro platform.

Introduce

Restarted to update the “iOS Reliable Internal Recommendation Topic”, and sorted out the positions that have been clearly recruited recently for your reference

[Beijing] – Baidu Wangpan iOS/Android/FE/Server R&D Engineer

[Guangzhou] WeChat Pay – Client Development – ​​iOS/Android

[Shanghai] Station B – iOS Development

[Shanghai] Baidu Input Method – Client Development – ​​iOS

[Shenzhen/Guangzhou/Beijing/Sanya] Bytedance – Clipping – Recruitment Client Development

For specific information, please go to: https://www.yuque.com/ioalliance/article/bhutav to view (if you have any recruitment needs, please contact iTDriverr)

Follow us

We are “Old Driver Technology Weekly”, a technical public account that continues to pursue high-quality iOS content, welcome to pay attention.

Follow politely, pay attention to [Old Driver Technology Weekly], reply to “2023”, and receive 2023 and previous year’s internal participation

It also supports RSS feeds: https://github.com/SwiftOldDriver/iOS-Weekly/releases.atom .

illustrate

? Indicates that a tool is needed, ? indicates an editor’s recommendation

Estimated reading time: ? Can be read quickly (1 – 10 mins); ? Medium (10 – 20 mins); ? Slow (20+ mins)

This article is transferred from: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23253
This site is only for collection, and the copyright belongs to the original author.