This profile

  • Topic: Updates to Apple’s product lines
  • Interview module: The difference between dynamic and static libraries
  • Great Blog: Should YOU Change jobs and How to prepare for an interview
  • See: a new, technical domain blog recommendation module
  • Learning materials: Rust data structures and algorithms
  • Development tools: Aria2GUI, a lightweight command line download tool that supports multiple protocols

This topic

Zhangferry: A wave of updates from Apple’s multiple product lines.

MacOS Monterey 12.3

  • Python 2 was removed from the system, but Python 3 was not pre-installed on the new system, requiring developers to install it manually.
  • Universal Control: Keyboard, mouse and trackpad work seamlessly between Mac and iPad (iPadOS 15.4).
  • M1-chip computers can be paired with AirPods that support spatial audio to use head-tracking.

IOS 15.4

  • FaceID with a mask is available only on iPhone 12 and later models.
  • 37 emojis were added.

Xcode 13.3

  • A compilation optimization for Swift has been added
defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
Copy the code
  • The Instruments received several improvements, including improvements to Leaks, the accuracy of Memory Graph Debugger scans, and more.

Collection of questions:

  • There are POD related exceptions in feedback packaging
  • Feedback compilation is slow

Swift 5.6 Released

  • Improvements to the type system. Type Placeholders SE-0315
  • Improved pointer interaction functionality
  • SPM adds the ability to run new plug-ins

There is also a small optimization: SE-0290: Unavailability Condition

Parsing the interview

Edited by JY

The difference between static and dynamic libraries

Static Library

Features are as follows:

  • Distribute files large

  • Static libraries by default link only useful class files to Mach-O (class file as the smallest link unit)

  • Ipa package is small (in order to slim down App, try to put the code in static library)

    • An object file in a static library is not linked to an executable if its code is not referenced anywhere-Objc-all_loador-force_loadTo handle static library class loading.
  • App cold start speed is fast

    • The premise is not to useDynamic library splittingcollocationDynamic library lazy loading scheme
    • In the App startup processrebasebind, multiple static libraries only needrebasebindAt a time
  • Possible sign conflicts exist

  • Shared the TEXT segment

    • IOS 9 previously had a TEXT limit of 60M for a single Mach-O
    • After iOS 9, the TEXT limit for a single Mach-O is 500M
  • No additional signature verification is required

  • The visibility of static library symbols can be modified during linking

  • Static library files in FAT format

  • Most of the forms are. A and. Framework

  • When static libraries do not contain bitcode, target deployments that reference static libraries cannot contain bitcode

Dynamic Library

Features are as follows:

  • Distribute file small

  • Large IPA packet (if lazy loading is not considered)

    • The dynamic library will take the wholelibTo copy into theipa
  • The App starts slowly in cold weather

    • In the App startup processrebasebind, multiple dynamic libraries only need multiple timesrebasebind
  • The appropriate runpath needs to be set

  • Need to load dynamically

  • A signature is required and a signature needs to be verified

    • Will check theframeworkThe signature must contain theTeamIdentifierAnd,frameworkAnd the host of the AppTeamIdentifierMust be consistent
    • Xcode re – signature to ensure dynamic library signature consistency
  • I need to export symbols

  • Repeated arch structure

  • Duplicate code in App and dynamic library can coexist without symbol conflict

    • Because executables in the link building phase, encounter static libraries will be absorbed, encounter dynamic libraries will be marked, and remain independent of each other.
    • For symbols from the dynamic library, the compiler marks them and hands them todyldTo load and link symbols, you defer linking until runtime. (For example, App uses 3.0 version SDK, and dynamic library uses 1.0 version SDK, which can work normally, but there will be risks)
  • The distribution size needs to be included after the link

  • During cold startup, it is loaded before main by default

    • By default, too many dynamic libraries slow down cold starts
    • If the form of lazy loading dynamic library can speed up the startup of App, it can be useddlopenbundleLazy loading optimization
  • File format Mach-O (an executable file with no main function)

  • When the dynamic library does not contain Bitcode, the target deployment that references the dynamic library can contain bitcode

  • Starting from v0.36.0, you can add the keyword use_frameworks! Compile to a structure similar to the Embedded Framework (call it the Umbrella Framework)

    • Disadvantages: By default, all project dependencies are changed to dynamic libraries (available)use_modular_headers!, can also be inpodsepcadds.static_framework = trueAvoid)
    • CocoaPodsExecute the script to embed the dynamic library into.appFrameworkUnder directory (equivalent to inEmbedded BinariesJoin the dynamic library)

Good blog

Edit: King Pilaf is here

The theme of this excellent blog is relatively light, talking about interviewing and growing up. I wanted to sort out the technical details of Rebase & Bind with the help of this issue, but the news of layoff spread by some we-media flooded the screen this week. It happened that I myself had changed my job recently, so I took this opportunity to pause my technical learning steps and look up the situation outside.

What will you gain from reading it?

  • If you’re wondering whether you should change jobs, read this article for part of the answer.
  • Dongye prodigal son and Xanthii two big man is very senior factory interviewer, their advice is very to the point;
  • Details of my recent interview;
  • Although do not agree with the interview to ask eight-part essay, but still to prepare eight sets for everyone, for everyone to enhance the confidence of the interview;

1. If you’re on the fence, see below

1.1 How to rationally judge whether they should change jobs — to the public account: Dongye Office school

King Pirav: I recommended this article last year. Considering that it is gold, silver and gold, some students may not have read it before, so I recommend it again.

2, The interviewer: Know your opponent, the interviewer’s focus

2.1 Some advice for candidates — from xaner’s tech blog

2.2 After interviewing over 500 candidates, I want to talk about some expectations from the interviewer’s perspective

King Pilaf: The above two articles are essentially the same. Interviewers expect candidates to think and act in their daily work, not cram for the exam. Therefore, it is better to spend half a year to brush questions and review basic knowledge than to use this time to seriously polish a project.

3, Candidates: Some details of the recent interview

3.1 Just changed a job, say something about looking for a job ~ — from the official account: King Pilaf is here

King Pirav: This is my recent personal experience. Some time ago, I talked with some friends about changing jobs. Including: Should I stay or go? How to prepare? How to write a resume? How to send a resume? What are the questions during and after the interview? , etc.

4, the most complete basic knowledge arrangement

4.1 “The most complete iOS eight-part Interview question” 2022 — from 51CTO: Yuye iOS

King Pilaf: The interview will more or less examine some basic knowledge. Students who are not at ease about basic knowledge can have a look.

stories

zhangferry

Something valuable to read or watch this week.

Deep learning hits the Wall — from: Heart of the Machine

Zhangferry: Back in 2016, Hinton, the godfather of deep learning, said that we don’t need to train radiologists anymore. But AI hasn’t replaced any radiologists. What’s the problem? In the view of Robust.AI founder Gary Marcus, deep learning may be about to hit a wall. The whole AI field needs to find a new way out.

Deep learning is essentially a pattern of recognition, and it works great when we only need rough results, but for things that require precision and high risk, like radiology and unmanned driving, caution is needed. Artificial intelligence really isn’t evolving as fast as we thought, so is its future pessimistic? No, the author argues that pioneers like Hinton have taken the research direction of deep learning too far. Deep learning and symbol processing should be combined, and this kind of hybrid artificial intelligence may be the best direction.

2. Google Search is dying — from the minority: Zhao Baidian

Reddit is currently the most popular search engine and Google search is dying. There are several reasons why Google is no longer recognized:

  • Advertising: Google makes most of its money from advertising, but too much advertising in search terms can seriously affect the user experience.
  • SEO optimization: Many people work in search engine optimization, which is unfair and can lead to poor search quality.
  • Ai: AI is trying to help you find what you’re looking for, but the guessing is often unsatisfying.

3. Leader, I want to improve the sharing atmosphere of the team — from the official account: Hockor

@Zhangferry: Most people will encounter technology sharing at work, how to create a good sharing atmosphere as a TL? First of all, it is clear that a good sharing atmosphere is of great benefit, such as improving the technical vision of the team, finding outstanding people in the team, improving the team’s combat effectiveness and expanding the team’s influence. Regular technology sharing sessions are common, and any sharing should be encouraged. “Sharing itself is a spiritually self-fulfilling act, so whatever the content, at least it is generous and prompt and positive feedback should encourage people to move on.”

At the same time, as participants of sharing, we should listen to it with a positive attitude of explorers. Learning with a sense of participation is very efficient.

4, Usage Statistics of Content Languages for Websites — from website: W3Techs

@Zhangferry: There is no doubt that English is the most popular language on websites in the world. But Russian is the second most popular language, and surprisingly, Chinese, which has a large number of users, ranks 10th in the number of websites. One reason I can think of is that the Internet was developed early in Russian-speaking areas, which spawned many websites. Although Chinese is used by a large number of people, it is relatively concentrated. The development of The Internet in China is relatively late. In recent years, the wave of mobile Internet has spawned many apps, but few websites have been created.

Website is one of the most important ways for people to get information at present. English website is far more than other languages, which also reflects that the discourse power of the Current English world is bigger.

Learning materials

Mimosa

Rust data structures and algorithms

Address: github.com/QMHTMY/Rust…

A Rust book with nine chapters in simplified and traditional Chinese (English and Japanese are in the works), covering algorithm analysis, basic data structures and algorithms, plus some actual practice. It includes the realization and explanation of common data structures, with detailed code and clear and concise diagrams.

Tools recommended

CoderStar

Aria2GUI

Address: github.com/yangshun102…

Software status: Free

Software Introduction:

Aria2GUI is a lightweight command line download tool that supports multiple protocols, making it easy to download offline resources.

About us

IOS Fish weekly, mainly share the experience and lessons encountered in the development process, high-quality blog, high-quality learning materials, practical development tools, etc. The weekly warehouse is here: github.com/zhangferry/… If you have a good content recommendation, you can submit it through the way of issue. You can also apply to be our resident editor to maintain the weekly. Also can pay attention to the public number: iOS growth road, backstage click into the group communication, contact us, get more content.

Phase to recommend

IOS Fishing Weekly issue 46

IOS Fishing Weekly 45th issue

IOS Fishing Weekly 44th issue

IOS Fishing Weekly 43