Old Driver iOS Weekly #244 | 2023-05-15

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

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

GitHub’s Code Scanning officially provides Swift support

GitHub’s Code Scanning scans and indexes a project’s Dependency information and provides:

  • Dependency Graph .
    • This means that developers can see which projects depend on their Swift libraries on GitHub.
    • You can use Dependabot to automatically submit a Pull Request to update the version of the dependent library when the dependent library is updated.
  • Security vulnerability warning . If a code base has a security vulnerability, it can use GitHub’s built-in function to record after releasing a repaired version. At this time, GitHub will notify all downstream projects that depend on this library, and automatically submit a Pull Request to update the dependency to the existing one. Fixed version.

Enhanced Global Pricing Mechanisms Benchmark Adjustments Trigger Price Increases

Apple announced in March that it will adjust the enhanced global pricing mechanism . Veteran Driver Technology also reminded everyone that we hope that everyone can choose the appropriate benchmark according to their needs in advance. It was launched on time in the early morning of May 9th, but the developers found that although the benchmark had been set to mainland China in advance, there was still a possibility that the price would be increased. For example, an IAP item originally set at 6 yuan became 8 yuan. The problem gradually recovered at around 10:00 am. Some developers woke up in the morning and received complaints from some paying users and could only deal with them in tears~

article

?? Use VSCode to build an Apple ecological development environment based on Bazel

@Cooper Chen : How to optimize the compilation development experience has always been a common problem for developers, and Xcode, as a tool that Apple developers must use, has a relatively closed ecological environment, which makes most developers often feel stretched for its compilation optimization . Bilibili, as an early domestic team that tried Bazel as the main compilation system for iOS, proposed a solution to use VSCode + Bazel to create a new development environment for these problems. Among them, the author’s core thoughts on compilation optimization include:

  • Try to only use Code itself, other capabilities such as IB that come with Xcode can be different if you don’t use it
  • Return to the compilation itself, turn off as many features that come with xcodebuild as possible
  • Fully embrace Xcode’s derivative development tool chain

According to the above ideas, the author uses the self-developed solution of VSCode + rules_bis, which has greatly improved the research and development experience and efficiency. At the time of posting, all Apple projects at station B have been switched to vscode(bis) / rules_xcodeproj(bwb) / dual mode.

@Damonwong : The purpose of publishing this article is a new perspective, I hope everyone can understand, but from my personal technical judgment, unless a large-scale team, Xcode is still the best iOS development tool.

Large-scale teams will have different problems due to various reasons such as team characteristics and organizational structure. Therefore, it is necessary to equip the team with some students who can solve engineering problems. Without this investment, front-line students will suffer unspeakably.

Of course, some students will consider technical value, but technical value varies in different scenarios.

To make a digression, many students like to engage in componentization, but I don’t know if you have considered whether componentization is really a reasonable architecture design when engineering capabilities are insufficient?

? A Swift Spelling Corrector

@吃笑饮食粉: This is a Python code based on Peter Norvig’s blog post “How to Write a Spelling Corrector”, using a spelling corrector written in Swift. Here are some descriptions of the code:

  • The edits1(word) function takes a word as input and generates a set of possible misspelling correction candidates
  • The SpellChecker structure is a spell checker that is used to train and correct words
  • The train(word) method is used to train the spell checker by adding the word to the set of known words
  • The knownEdits2(word) method returns the set of known words with a distance of 2 from the given word
  • The known(words) method takes a sequence of words as input and returns the words present in the set of known words
  • The correct(word) method takes a word as input and returns the corrected spelling

This code demonstrates how to write a simple spell corrector in Swift. It uses some string operations and collection operations, as well as some basic Swift language features.

? Behind-the-Design: Meet Copilot. When the system is the product; on … | by Microsoft Design | Microsoft Design | Apr, 2023 | Medium

@Barney : This article mainly discusses the design concept, experience framework and development principles of the artificial intelligence product Copilot, and how to enhance human capabilities through AI. Here are a few key points:

  • Collaboration : Copilot is designed with people at the center, using AI as a collaborative partner of users, not a tool to replace people.
  • User control : In the design, focus on the dominant position of the user, emphasizing the user’s control and understanding of AI.
  • Multiple experiences : Copilot provides immersive, assisted and embedded experiences to meet different work environments and cognitive needs.
  • Openness and learning : Microsoft adheres to open design, actively seeks feedback, and continues to learn and improve.

Overall, the article explains how Microsoft demonstrated the collaborative value of AI through Copilot, while emphasizing the importance of keeping people at the center of the design and development process, and continuously learning and improving.

? Double Protocol Conformance

@zvving : Double protocol conformance means that a type declares multiple times to conform to a certain protocol. When a type in the same target declares the same protocol multiple times, Xcode throws an error and stops compiling, but when the same protocol implementation is declared in different targets, the problem becomes harder to spot.

The author also shared a more extreme situation. When three targets are involved, Xcode no longer displays warning messages, making it difficult to find our mistakes in setting protocol conformance. The authors recommend that development teams working in multi-modular codebases ensure that rules are set for protocol conformance to avoid corner cases like this.

? iOS client animation optimization practice

@Smallfly : It is a very common requirement to display animations in the app. This article introduces various crashes caused by insufficient memory when using animations on the QQ Music iOS side. After a series of optimizations, in terms of performance and stability Great improvements have been made, mainly including:

  • Solve the problem of frequent crashes;
  • The loading performance of the first frame remains stable;
  • Image memory hit rate increased from 65% to 76%;
  • Compared with open source solutions in the industry, it takes up less CPU, uses less memory, and has better fluency.

Students who are interested in specific optimization measures can refer to the original text.

? The file name is still the top-level domain, I can’t tell the difference

@Damien : Google released a wave of new top-level domains in early May, including .dad, .phd, .prof, .esq, .foo, .zip, .mov and .nexus, among which .zip and .mov are the most popular It is easy for people to misunderstand the address of the file. Based on this, it is easy to lead to a MacOS security hole. Students who are interested in the hole may wish to read it.

? Jingxi APP – Image Library Optimization | JD Cloud Technical Team

@J_Knight_ : This article introduces the two optimization directions of the Jingxi team on the picture frame: on the one hand, it reduces the network transmission of pictures and improves the picture loading speed. Another aspect is to reduce image memory consumption. In network transmission, the image framework first preprocesses the image URL. The preprocessing includes unifying the domain name, adding scaling parameters, adding webP parameters, and adding degrading parameters to reduce the size of image network transmission. In terms of memory consumption, the method of image scaling and limiting the upper limit of the cache is used to avoid excessive cache usage. At the end of the article, several directions for optimization in Flutter are also introduced.

? Taobao APP Network Architecture Evolution and Weak Network Barrier Breaking Practice

@AidenRao : This article will introduce the evolution process of Taobao APP’s unified network library, and describe how to continuously build a north-south direction (traffic between client-server) terminal network architecture from monitoring to acceleration integration around the experience, and build NPM weak network diagnosis perception Capabilities, implement native multi-channel technology/multi-protocol optimal scheduling method, fit manufacturers to enable network request acceleration, realize de-SPDY and smooth transition of large-scale IPv6/H3 protocol clusters, and provide users with better weak networks and better networks The APP loading and browsing experience supports the business and creates more possibilities.

tool

AppleParty (Apple Pie) v3 supports App Store’s new pricing mechanism – batch configuration of custom prices and sales range

@ChengzhiHuang : Apple Pie is a tool that can conveniently manage all IAP in-app purchase items. Compared with operating each item on AppStore Connect, the operation in Apple Pie is more convenient, and it also supports base country and custom price configuration , sales range configuration, batch upload and other practical functions. At the same time, the engineering code is all open source , and the calling methods such as Connect API are also of considerable reference value.

audio and video

? Microsoft developers disassemble SwiftUI optimization cheats, teach you to easily improve performance by a hundred times

@EyreFree : The author summarizes the relevant experience gained from optimizing the company’s SwiftUI project in two weeks in the form of a video demonstration, which combines the explanation of the basic SwiftUI control layout and refresh mechanism. Friends who are doing SwiftUI development should not miss it.

Moyu Weekly

@探鱼周报#93 : The 93rd issue of Moyu Weekly is here, let’s take a look at the summary of this issue:

  • Topic of this issue: The enhanced global pricing mechanism of the App Store on May 9 has been updated
  • Recommended content: modular architecture, Deep Dish Swift summary, TabularData framework-related blog posts.
  • Touch the fish: I recently made some attempts to use AI technology, opened a Xiaohongshu account for AI drawing, and developed a browser plug-in that summarizes web content; a summary of GPT demand assumptions; a summary summary plug-in glarity; for developers ChatGPT Prompt writing guide

Introduce

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

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 “2021”, and receive 2017/2018/2019/2020 internal reference

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/%23244
This site is only for collection, and the copyright belongs to the original author.