Old Driver iOS Weekly #238 | 2023-03-27

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

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

The deadline for submitting with Xcode 14.1 is approaching

After April 2023, all newly submitted apps will have to be submitted using Xcode 14.1 and later versions. Students who have not yet migrated need to speed up the progress. If you are still using the old version of Xcode to submit the build version recently, you should have received the ITMS-90725: SDK Verison Issue warning.

article

?? bilibili-AVIF image format landing

@JonyFang : In today’s environment where experience is more and more important, the requirements for image libraries are also increasing. From a cost point of view, using the AVIF format can save a lot of network bandwidth and storage space, reduce website loading time, and improve user experience, thereby improving the efficiency and profitability of the website, thereby saving a lot of money. This article introduces the implementation of the AVIF image format in bilibili, the content outline:

  1. Research on AVIF Image Format
    • Image Format Codec Research
    • Research on the landing of AVIF at Station B
  2. split end implementation
    • server architecture
    • Web implementation
    • Mobile terminal processing (decoder selection, request strategy, monitoring and degradation strategy, pits stepped on by both ends and how to climb out)
  3. Business landing
    • Web side
    • mobile terminal
  4. data monitoring
    • Server monitoring
    • Mobile monitoring
    • bandwidth gain
  5. Problems encountered during promotion
    • Online resource pool capacity
    • Low utilization due to uneven load
    • Insufficient R&D resources
  6. Outlook & QA

?? Flutter Dart: Generic covariance and contravariance

@CrazyCoderShi : This article gives a detailed explanation of the Dart paradigm system, which is easy to understand; each explanation has detailed code examples, which is a good learning material for students who are not familiar with paradigms and the Dart paradigm system , I strongly recommend.

? Keyboard shortcuts for Export Unmodified Original in Photos for Mac

@Cooper Chen : This article is aimed at the situation where the photo application on the macOS system does not provide a keyboard shortcut for the “Export Unmodified Original Photo” command. By using a shell script, you can specify Ctrl+Opt for up to 20 selected items +Cmd+E shortcut key combination to export the unmodified original file. This provides Mac desktop developers with some ideas for shortcut key maintenance, which can be used as some references and references.

? Wrapping functions in structs

@zvving : This article explores the rationale for wrapping functions into structs in specific scenarios:

  1. Avoid mispassing wrong functions: Using a struct reduces the possibility of passing in wrong functions, because now a concrete type needs to be passed.
  2. Provide a namespace: Wrapping a function into a struct provides it with a namespace for easy code organization.
  3. Improve code readability: Use structs to add labels to function parameters, making function calls clearer and easier to understand.

While wrapping functions into structs is not appropriate in all cases, it does provide developers with a useful programming technique that can improve code maintainability and readability.

? Apple’s in-app purchases: Understanding and thinking about the new pricing rules :

@含笑饮食粉: In March 2023, Apple released new pricing capabilities, including support for setting the region where the App/IAP is located and the global price balance, support for custom prices in a certain region, and the ability to prohibit sales. These new capabilities have given us more operational freedom and risk control capabilities in pricing, but at the same time, the new capabilities have also given us more points to focus on. For ordinary developers, what needs to be done later is mainly to adjust the App/IAP base region. For medium and large teams, in addition to changing the base region, it may also involve more considerations such as risk control strategies, App Store Connect API upgrades, and monitoring tool chain upgrades. For more information, please read this article in detail.

? Handling status bar color scheme and visibility in SwiftUI

@AidenRao : This article describes how to handle status bar color and visibility in SwiftUI. The author has open sourced an open source library called ScrollKit which provides some scroll view wrappers to make it easy to handle offset tracking, sticky headers, etc. The author also describes how to use the .statusBarHidden() view modifier to hide the status bar, and creates an ObservableObject to manage the status bar’s visibility state. Finally, the author provides a custom view modifier that makes the status bar’s visibility update automatically.

? Removing Search Web from a context menu

@zoeGuo : When the text in UITextView or WKWebView is selected, a UIMenu will pop up, we call it context menu. The problem I encountered is: I don’t want the Search Web implementation in the menu, because this default implementation only supports searching in Safari, if the user uses other browsers as the default browser, then this function cannot be used. The solution is: override the replacingChildren(_:) method of UIMenu to prevent other items from being replaced by Search Web, and then add custom implemented items. The detailed implementation code is attached to the article. Interested readers can read the original text carefully~

? Why is my codebase so big? Talk about Git bad habits

@Barney : This article is very down-to-earth and analyzes the reasons why the code base is getting bigger and bigger and the bad habits of using Git. It is simple and representative.

  • Analysis of real scenarios where the code base grows larger
  • Detailed Git structure
  • Best Practices

Application of JVMTI in Mobile Taobao Profiler

@Crazy : This article introduces how to use JVMTI to monitor the status of the online version. By modifying the JDWP and Runtime files, the author describes how to bypass the limitation that JVMTI can only run in Debug mode, and provides some methods to deal with the restricted version. In addition, this article also introduces the TBProfiler tool packaged by Taobao, which can mainly complete the following monitoring tasks:

  • Operation monitoring: including method call monitoring, thread and class monitoring, exception capture and main thread lock monitoring.
  • memory monitor
  • Memory Dump: including object instance information, Hprof and Mini Hprof generated by JVMTI.

It can be seen from the functions used by Taobao that the capabilities provided by JVMTI are very powerful and practical. When the information provided by the log is not enough to support us to analyze online problems, JVMTI allows us to get closer to the Runtime and obtain more runtime information. Therefore, this article is very suitable for students who need to monitor online to read carefully.

the code

gptcommit

@老狼: The last few months have been a period of concentrated explosion of AI. According to NVIDIA’s Lao Huang, AI has officially entered the “iPhone Moment” of the technology industry that has not been seen for many years. Talents from all walks of life are also exerting various creativity in various applications of AI.

For many students, how to write a commit message has always been a difficult problem. It is not an easy task to cover the core of code modification in the shortest possible sentence. gptcommit is to automatically generate commit information through GPT-3, liberating everyone’s brain cells. Although the model used is not the latest GPT-4, the idea is worth learning.

Moyu Weekly

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

  • Topic of this issue: Xcode 14.3 RC release
  • Content recommendation: recommend some recent excellent blog posts, covering the use of CreateML, runtime exploration, XCTest performance testing, etc.
  • Touch the fish: Cursor integrated with GPT-4; Github launched CopilotX; AI tools use efficiency, prompt writing mode

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 editor’s recommendation

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

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