Old Driver iOS Weekly #255 | 2023-08-07

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

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 .

article

? Bad practice: capturing a method reference

@AidenRao : This post discusses the bad practice of capturing method references in Swift. The article pointed out that although the self keyword does not need to be explicitly used when passing a method reference as an argument to a function, in fact the compiler will automatically capture a strong reference to self, which may cause problems with circular references, and the compiler does not will warn about this.

? Objective-C Internals

@Smallfly : Although Swift has become the official default programming language, most large-scale applications in China are still dominated by Objective-C, and proficiency in Objective-C is of great help to understand the underlying system implementation. This blog shares a series of articles that analyze the internal implementation of Objective-C, involving class implementation, isa pointers, instance variables, and memory management. Each article is short and in-depth, and students in need can check for omissions and fill in the gaps.

? How to Create Callback-like Behavior Using AsyncStream in Swift

@Barney : The article explores in detail how to use AsyncStream to achieve callback-like behavior in Swift, with a particular focus on tracking download operations.

  • Swift Concurrency Revolution : An overview of how AsyncStream is revolutionizing asynchronous code handling.
  • Replacing Old Methods & Creating Example : Demonstrates how AsyncStream can replace traditional closure-based methods by simulating a download operation example.
  • AsyncStream Implementation & Considerations : An in-depth explanation of the implementation details of AsyncStream, emphasizing the importance of calling the finish() method.
  • User Interface Integration : Describes how to integrate the download progress with the UI and shares a link to the full code.

? How Xcode 14 debugs iOS 17

@EyreFree : This article records the process of the author trying to use Xcode 14 to debug iOS 17, and finally gives a solution. The author personally tested that Xcode 14.3 is effective, and students who need to adapt to the latest operating system can take a look.

? Smart Open Xcode

@吃笑饮食粉: This article shares how to intelligently open multiple versions of Xcode on macOS. The author is used to mapping the Caps Lock key as a super key for quickly switching to Xcode. However, since different versions of Xcode may cause hard-coded hotkeys to open the wrong application, the author introduces a small Lua scripting utility called Hammerspoon to solve this problem. Also, the author shared an add-on that allows scripting to be extended to the emulator. This allows for quick switching to the simulator when needed, and convenient switching between the simulator and Xcode.

? ​The system comes with a log framework os.Logger

@Cooper Chen : OSLog is a log system launched by Apple at WWDC2016, and Apple updated it at this year’s WWDC23. This article introduces the basic situation of the unified log framework, as well as the specific usage scenarios of usage, privacy and log guidance , the focus also mentioned the update of OSLog this year, which provides more convenience for developers in the debugging phase.

? Baidu APP iOS terminal package size 50M optimization practice (5) HEIC picture and useless class optimization practice

@xuyafei86 : In the previous series of Baidu APP package size optimization articles, several methods of image optimization and code optimization were introduced. This article focuses on the optimization practice of HEIC image and useless class detection.

HEIC is the abbreviation of High Efficiency Image Format (High Efficiency Image Format), which is a new image file format introduced by Apple in iOS 11 in 2017 to replace the JPEG image format to compress images more efficiently and reduce storage space occupied. HEIC supports multi-frame images, transparency, and 16-bit depth color, making it ideal for high-quality images and animations.

This article focuses on the feasibility of using HEIC images in Baidu APP and the package volume benefits, verifies the compatibility of HEIC images in Bundle and Asset Catalog, focuses on the mechanism of Asset Catalog image management, and records the special problems and problems found in the verification process. Solutions. The useless class introduces in detail how to reduce the code size by combining static analysis and dynamic analysis. Interested students can read the original text to understand.

the code

TipKit-Examples

@zoeGuo : TipKit is a new UI component library released on WWDC23: Make features discoverable with TipKit , TipKit-Examples is a good sample code for using TipKit, interested readers can read the source code by themselves.

design

? A WWDC Design Lab Made My App So Much Better

@水水: WWDC Design Lab can communicate with Apple engineers, designers and experts. The author of this article introduces that he had a very friendly exchange with Apple designers in WWDC Design Lab on his weather application app. Apple designers Provided some very good suggestions and feedback, the author also made improvements with great care, it can be seen that the final improvement results are very satisfactory.

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/Hangzhou] – Douyin Cast Screen – Android/iOS

[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); ? Moderate (10 – 20 mins); ? Slow (20+ mins)

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