Old driver iOS weekly, just for you to present valuable information.

You can also contribute to the project, if you find valuable information, articles, tools, etc., please send it to us in Issues, we will deal with it as soon as possible. Be sure to include a reason for your recommendation. Suggestions and comments are also welcome to Issues.

WWDC20

This week, we posted two articles from WWDC20 on our official account, and each one is great!

  • Use Swift type inference
  • Milestones for Swift Package Manager

news

🌟 Apple’s fall event, a special event, will take place early Wednesday morning

@ Parsifal: Apple’s fall product launch event will be held at Apple Park at 1am on Wednesday (Sept 16). Like WWDC 20 this year, the event will be streamed live in China on iQiyi, Bilibili, Tencent Video and Sina Weibo. According to some media sources, there may not be an iPhone 12 at this event, so I wonder if Apple can surprise us.

The article

🌟 🐕How to improve code quality

Good quality code is simply “good-looking and easy to use”. Good-looking code means that it is readable, easy to understand, and easy to maintain. Others will not scold you when they take over. Easy to use means that the code is robust, error-free, and the machine runs without scolding you. Even when mistakes are made, they are easy to locate, stop and recover.

There are two ways to have high-quality code:

  • The first way is to have good design and then implement it with good coding and then continue the good coding style
  • The second way is to start with bad code -> refactor towards good design and code style -> and continue

This article mainly introduces how to produce good code from the perspective of “approach one”, and elaborates in depth from the perspectives of specification, practice, measurement and improvement. It is recommended to read.

🐕 How far is the App Clip from landing?

JonyFang: WWDC2020 leads to App Clips. The configuration and link handling of App Clips was covered in WWDC20 insider. So far, we’ve seen the benefits of App Clips, such as immediate availability. This paper lists the possible problems of App Clips real landing from two perspectives of business and technology, and the measurement Angle can be used as a reference for our actual business landing process.

Here are a few things worth thinking about when App Clips land:

  • Business perspective
    • Support for offline payment in domestic market
    • Domestic small program competition
    • Only iOS 14+ users are supported
    • Although a variety of ways to evoke App Clips are provided, the trigger conditions are relatively strict. For example, Clip Code can only passCamera systemTo be able to evoke
    • The most favorable way to invoke a purely online App is through Safari, but there are many steps in the operation path
  • Technical point of view
    • You need to split the code for the business or componentize it thoroughly enough
    • Maximum size of 10M App Clips
    • App Clips does not support background processing activities. Such asThe background does not support network requestsEtc.
    • How can users of App Clips be uniquely identified and bound with corresponding App users
    • App Clips Evokes three-party Apps, but three-party apps do not support evoking App Clips. Therefore, the scenario of three-way login, three-way sharing and three-way payment will be affected
    • Enterprise packs are not supported
    • App Clips support for CocoaPods isn’t perfect

🐕 IOS performance optimization – Allocations Analyzes memory Allocations

JonyFang: During development, we sometimes ran into problems related to memory profiling, this article covers Allocations tools. The Allocations tool provides several ways to analyze memory:

  • Statistics
  • Call Tree
  • Allocations List
  • Generation

Using the above analysis methods, we can locate the blocks of code that need to be optimized for memory. The reading process can be manually analyzed with the Demo provided by the collaborator. Demo address: github.com/LeoMobileDe…

🐎 LeetCode Cookbook

@Damien: Still agonizing over how to improve algorithm power? Check out LeetCode Cookbook for elegant typography and easy-to-understand problem solving to help you navigate your way through algorithms.

🐎 Interviewing for an iOS Design System Engineer role at Spotify

Lao Donkey: Are you still wondering the difference between the interview of Internet companies at home and abroad? Are you still wondering what skills overseas Internet companies need to interview? Here’s a summary from a Spotify engineer to find out.

🐢 Agora Talk review | in-depth Talk about different Flutter

Flutter has come a long way since its debut due to its unique underlying design and development language, but as a cross-platform framework it is also highly regarded and controversial.

The following are some of the most ridiculed aspects of Flutter:

  • Flutter nested disgusting
  • Use DART instead of JS
  • Mixed development is more troublesome than RN
  • Hot updates are not supported

But Flutter has some advantages of its own:

  • Rapid spread of Flutter
  • The Web, Linux, Win and other platforms are also making rapid progress
  • Excellent performance in UI compatibility and code reuse
  • Better performance than other cross-platform frameworks

This article not only introduces the advantages and advantages of Flutter in detail, but also analyzes some interesting Settings in the Flutter world, such as the relationship between widgets and elements, and other elements that make up the Dart layer rendering loop.

🐢 Deep analysis of Hybrid Composition under Flutter 1.20

@CrazyCoderShi: Flutter provided PlatformView in early versions to solve the problem of viet-level NativeVivew mixing with Flutter, but PlatformView was somewhat disappointing both in terms of development experience and performance.

As a result of official and community efforts, Hybrid Composition’s PlatformView implementation has been added to Android since version 1.20. This implementation will solve most platformView-related problems that have previously existed on Android, such as the mysterious Web interface disappearing after the keyboard pops up on Huawei phones.

This paper explains the Hybrid Composition access and the underlying principle in detail.

🐕 Private APIs, Objective-C runtime, and Swift

@ four niang: There are some APIS in Foundation flagged as NS_SWIFT_UNAVAILABLE, such as NSInvocation/NSMethodSignature, They are marked as unavailable because they are insecure or do not fit well into Swift’s system.

However, sometimes we have to deal with these apis in the face of platform SDK problems. Then how to call and encapsulate these apis in Swift becomes a problem. The author of this article introduces his solution in detail:

let object = NSDate(a)let objectPrivate = object as! NSObjectPrivate
let selector = Selector("description")
let signature = objectPrivate.methodSignature(for: selector)!
let invocation = NSInvocationClass.invocation(methodSignature: signature)
invocation.selector = selector
invocation.invoke(target: object)
var unmanagedResult: Unmanaged<NSString>? = nil
invocation.getReturnValue(&unmanagedResult)
let result = unmanagedResult?.takeRetainedValue()
print(result ?? "<nil>")
Copy the code

🐕 The App Design philosophy behind the evolution of iPhone screen size

@Zhang Jiafu: From the first generation of iPhone released in 2007 to the iPhone 11 series released in 2019, the screen sizes of iPhone have covered seven types: 3.5 inches, 4 inches, 4.7 inches, 5.5 inches, 5.8 inches, 6.1 inches and 6.5 inches. The iPhone 12 is rumored to come in two sizes, 5.4-inch and 6.7-inch, when it launches this fall. As the timeline goes by, the screen size of iPhone has become more and more complex. To adapt to all these screen sizes, an app needs to consider many factors in the whole process from design, development to promotion. How did the iPhone’s screen size evolve over 13 years? Based on the integration of hard and soft design, what are the evolution laws behind the change of screen physical size? How are these changes affecting the mobile apps we spend so much time with? Can we see where the iPhone will go in the future based on what evolution has done? What more can we infer about the iPhone 12 based on the new clues found in the iOS 14 Beta? Author Allen Chu explores these issues in this post.

code

🐎 VAP

EyreFree: VAP (Video Animation Player) is an implementation scheme developed by Penguin esports for playing special effects Animation. It has advantages of high compression rate and hardware decoding, and supports iOS, Android, and Web platforms.

  • Compared with WebP and APNG GIF schemes, it has the advantages of high compression rate (smaller material) and hardware decoding (faster decoding)
  • Can achieve more complex animation effects (such as particle effects) than Lottie

push

Senior driver Weekly team combined knowledge collection and SwiftGG Translation group included a reliable internal promotion position.

If you want to looking for a job, click here: www.yuque.com/iosalliance…

If you want to recruit people, click here: www.yuque.com/iosalliance…

Of course, you are also welcome to pay attention to our weekly report, we will update the editorial post at the bottom of each weekly report.

Pay attention to our

We have opened an official account, and the official account (LSJCoding) will push a message when each issue is released, welcome your attention.

RSS feeds are also supported: github.com/SwiftOldDri… .

instructions

🚧 indicates that a tool is required, and 🌟 indicates that editing is recommended

Estimated reading time: 🐎 in a short time (1-10 mins); 🐕 medium (10-20 mins); 🐢 slow (20+ mins)