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.

topic

🌟 🐒 About Swift ABI stability

ABI stability is finally coming, three years late.

Evolving Swift On Apple Platforms After ABI Stability Apple Platforms has published ABI Stability and More and Evolving Swift On Apple Platforms After ABI Stability Related content brings about change. Don’t be afraid if you can’t read English, the careful cat has come up with a great summary of what Swift ABI stability really means to us.

The Swift ABI was a milestone for Swift, bringing cross-platform capabilities to the next level, but the Swift ABI has not had much impact on iOS developers, many of whom mistook API stability for Swift ABI stability. For developers, only when the API is stable can there be no need for migration and adaptation.

If you don’t know what the Swift ABI is, take a look at apple’s Swift ABI Stability Manifesto, published last year. At the same time, Poxue also made a great translation: translation: Swift ABI (I) and translation: Swift ABI (II).

Finally, what do you think about the Swift ABI that can be in ourGithub IssueGive your opinion and discuss with the editor of the weekly newspaper.

news

Swift 5.1 release schedule

The Swift team has recently blogged about the 5.1 release plan, which aims to achieve Module Stability, which simply means forward compatibility of the Module interface.

In addition, the collection of knowledge has also been translated for the first time. I recommend reading this one.

It’s time to stop using index(of:)

Se-0204 is implemented in Swift 4.2

  • increaselastIndex(of:)
  • increaselastIndex(where:)
  • index(of:)The namefirstIndex(of:)And discard the original method
  • index(where:)The namefirstIndex(where:)And discard the original method

The article

🌟 🐒 Swift5 new feature @dynamicCallable brings dynamic magic

One year after we mentioned in the first issue of this weekly that Swift was on the verge of seamlessly communicating with Python, today “Writing Python in Swift becomes a reality” with the release of Swift5’s new @dynamicCallable feature.

The genesis is two proposals by Chris Lattner: @DynamicMemberLookup provides the ability to dynamically find members (Swift4.2) and @DynamicCallable provides the ability to dynamically call methods (Swift5). It’s hard to imagine two syntactic sugar redefining the dynamics of language and allowing one to see Swift as the language of glue.

Here’s a three-part series on grammar sugar:

  • #1 Unix Tools as Swift Functions

    A thin layer of encapsulation makes all Unix Tools Swfit methods, providing such calls: shell.env(), shell.ls(“-a”, “-l”), shell.python(“–version”);

  • #2 Swift/ObjC Bridge

    An easy Swift objective-C bridge based on @dynamicCallable. The implementation is similar to PyObjC

  • #3 Mustasheable

    Provides a concise and elegant way to call the generator of the template language Mustache.

New to Swift 4.2: Dynamic Member Lookup

🌟 🐎 Architect thinking

The word “architect” sounds like a very high Title, and for most of my career, it was a mountain in my mind. Although the requirements for architects may vary from company to company, the impression of an architect should be one of technical excellence. What kind of architect mind should you have besides technical excellence? In this article, the author explains what is the architect thinking from both the developer and the development direction, which is worth pondering carefully. With this thinking, you may have new discoveries and new directions to work on.

🐎 Behind the Proposal β€” SE-0200 Enhancing String Literals Delimiters to Support Raw Text

The SE-0200 proposal enhances the ability of string delimiters to support raw text.

  • Support for multiple lines and with Swift’s original string functionality (such as interpolation), example: “”” line1 \(line2) “”

  • To override the edge escape character edge special case, Rust’s design is referenced to support custom delimiters to declare raw strings, as well as interpolation. #””# changes the escape delimiter from \ to \#.

    • #"\#(val))"#Is the same as before\(val).#"\n"#The output\n.
    • ###"\nline"###, the escape delimiter is"\ # # # #"And the output\nline.

🐒 Swift 5 Exclusivity Enforcement

In early 2017, the Swift community published a long article about some improvements in memory security for Swift 4, which was translated by @onevcat.

Most of the changes mentioned above have already been implemented in Swift 4.x. In the upcoming Swift 5, “exclusive access” has been enhanced: running in Release mode is also enabled by default.

In Swift 4, only in Debug mode, the Runtime checks for “exclusive access” (Debug and Release are both checked at compile time, but compilation checks may not be complete). In Swift 5, Release Runtime is also enabled by default (you can turn it off manually). The article details what problems this change may bring and how to deal with them.

🐎 How many apps use Swift in 2019?

The authors analyzed the Top 110 apps on the App Store in the U.S. to see how many use Swift. As a result, the current Top 110 apps that use Swift and those that do not use Swift are basically in a 50/50 state.

Switching to Swift is much more difficult for a large company than it is for a small company, so this is not surprising. Hopefully over the next year, the Swift percentage will increase further as ABI stabilizes.

πŸ• Painless UI Testing in iOS: Mocking the Network

This is the first article in a series of Painless UI Testing in iOS. This series intends to introduce three ways to make UI testing faster and more reliable. The first is introduced in this article, the second is introduced in the second Stubbing the Navigation. The third article in the series has not been released yet, but you can follow them on their technology blog eGym Software Development. The author of this series shares his ideas in detail in the way of attaching codes to design ideas, which is very worthy of learning and reference. Students who are keen on UI testing should not miss it.

🚧 πŸ• Deep Diving React Native Debugging

When developing React Native applications, you can enable Remotely Debug JS in Chrome. This includes debugging breakpoints, viewing stack information, and variable states. Runtime is not ready. Make sure your packager server is running. We often contact with these daily development of things both familiar and unfamiliar, might as well follow this article to read the source code and debugging, everything will be suddenly clear.

Recommended by @shannonChenchn.

πŸ• Analyze an interesting requirement — HTML code injection

In iOS Hybrid APP development, we often have the requirement that JavaScript interact with Objective-C via WebView. In this paper, the author takes the problem of WKWebView accessing an HTML page and obtaining all the input information of the user as an example, and disassembs the requirements into the following parts to finally solve the problem.

  1. HTML and native interaction
  2. HTML gets the specified element
  3. Add events to HTML elements dynamically through JavaScript
  4. Inject JavaScript into HTML and call native code via WKWebView

By disassembling the requirements step by step, the author decomposed the abstract problems into the combination of each small problem, and then analyzed and verified one by one, and finally solved the relatively complex problems. In fact, this is exactly how to analyze the specific requirements, and into the code of a process, interested readers can follow the author’s ideas read, should be inspired.

Recommended by @chouheiwa.

🐒 How I failed 39 interviews and what I’ve learned

For most software developers, going to work for a big factory is a goal, according to a second-year computer science major who failed 39 interviews. The author has dreamed of working for Google, Facebook and other big companies since childhood, and this article summarizes his experience of interviewing big companies repeatedly and failing. The old driver recommended to everyone, I hope to help you who is trying to be confused.

πŸ• Demystifying UIKit Spring Animations

Spring Spring animations have been a public API since iOS 7, but the hold-duration interface was pretty unnatural at the time, IOS 10 has gotten better with the release of UISpringTimingParameters and UIViewPropertyAnimator, but making good spring animations is still not easy. This article will show you what spring animation is, how it works, and how to debug it just right.

🐎 Swift 5 The beauty of string interpolation

This translation type String is introduced for ExpressibleByStringInterpolation three extension implementation of the agreement, with precise control String interpolation way of printing. In Swift 3 when abandoned ExpressibleByStringInterpolation agreement, is now in a more elegant and more scalable ways to achieve. It is recommended that you read the SE-0228 proposal in parallel to see how the new and old implementations compare, as well as the scalability and performance improvements that the new implementations bring. You can also look at the implementation of HTML, LocalizableString, and SQLiteStatement extensions that are not String types.

🐎 Application practice of VipSHOP iOS code coverage

In this rapidly iterative software development ecosystem, quantifying test data becomes an essential step in software testing.

In this article, the author will take a step-by-step look at the application of iOS code coverage. The main steps in the article can be broken down into several parts.

  • During compilation, LLVM can use GCDA/GCNO to record code coverage for intermediate code staking
  • In the process of program execution, the record file is brushed into memory and uploaded to the server using HTTP interface
  • LCOV is used as a record file analysis tool to generate visual report data

Compared with the traditional line/function/branch coverage, the new line differential coverage is introduced. Preprocessing coverage files and adding attributes related to the number of different code lines to support the merge of different/multiple versions.

If you want to know more about GCC piling see this blogger’s links to a series of studies

tool

πŸ• Introducing the sourcekitd Stress Tester

Sourcekitd is a tool that provides data support for Xcode and the recently released SourceKit-LSP editor core functionality. Such as Swift file code completion, syntax highlighting and refactoring. To help improve its robustness, this article introduces a newly introduced tool, the Sourcekitd Stress Testing Tool. In the past few months, it has helped find 91 reproducible Sourcekitd crashes, assertions that failed and hung. This article describes the Sourcekitd implementation, how to deploy it in Swift CI and PR tests, and how Swift developers can run it in their own projects to help improve everyone’s Swift editing experience.

code

🌟 MicroKernel

MicroKernel is a client MicroKernel architecture, which regards the business and infrastructure as plug-ins and forms a plug-in MicroKernel architecture. For business, the business and foundation of all other modules are injected dependencies.

MicroKernel follows the tenets of architectures such as the Clean Architecture and the Hexagonal Architecture, which form boundaries and layers based on the causes and frequencies of code changes.

It is divided into the following levels:

  • MicroKernel: the App driver, which provides MicroApplication management, communication mechanism, dependency injection, and routing.
  • MicroKernelService: A basic capability service that runs through the App and provides domain abstraction of the basic capability, not including specific technology selection, without being tied to the dependency injection form.
  • MicroApplicationService: A business service that runs through an App and is aggregated from a reuse perspective, including its overall business solution, such as sharing, login, payment, etc.
  • MicroApplicationCoordinator: loose coupling between MicroApplication coordinator.
  • MicroApplication: independent business, aggregated from the perspective of function, is called application in architecture, and its forms include Native, H5, Hybrid, small program, etc.
  • MainApplication: registration and configuration of the architecture of the whole App, as well as docking of external channels.

MicroKernelDemo is a practical demo designed to help readers familiarize themselves with the concepts and usage of MicroKernel by simulating a simple business scenario.

Aiolos

Aiolos is a Floating panel-inspired Swift UI framework that was introduced in the maps app in iOS 11. It’s completely gear-driven and automatically responds to the on-screen keyboard. In contrast to many other open source panel solutions, Aiolos is designed to be an always-visible child view controller and therefore doesn’t use iOS’s custom view Controller conversion API. Carthage can be integrated into the project, easy to use, interested students can have a try.

EasyTransitions

EasyTransitions is an easy-to-use transition animation library that helps developers create custom interactive transitions using simple functions defined in the protocol, avoiding the hassle of implementing them using multiple transition apis in UIKit.

features

  • Custom transition simple Settings
  • Support modal presentation, UIPresentationController and UINavigationController transitions
  • Interactive conversion support in line 1 with multiple panning gesture directions
  • Three custom transforms are used as examples
  • IOS and tvOS

The EasyTransitions library is useful for interested readers, but it’s only available in the Swift version.

Audio and video

Swift Community Podcast #3 – Result Type, Character Literals and Swift Evolution

Swift Community Podcast is a radio program held by Swift open source Community to discuss the features and applications of Swift language. It can be basically considered as the official Podcast of Swift. The third session was hosted by Chris Lattner, the father of Swift, and two guests: Jon Shier, who proposed the Result Type and is one of the defenders of Alamofire, and Kelvin Ma, who is still a student. The three people first discussed the open source history of Swift and the important time nodes, and then started to talk about the past and present of Swift’s error handling, leading to the necessity of Result type. Finally, some interesting things about the Character Literals proposal are discussed. The overall atmosphere is relaxed, especially Jon Shier’s clear pronunciation, which is very suitable for students who are not good at English (such as me). Almost all of them.

What new technology ggtalk | 2019 ready to learn?

As an active, competitive and learning iOS community, iOS programmers must be most concerned with the topic of 9102, what should we learn. Of course, this topic varies from person to person. Ggtalk invited Teacher Rong and Uncle Lian from SwiftGG translation Group to talk about their study plans in 9102, which can provide certain reference for the general iOS students who are anxious about learning.

push

  • IOS development & architecture: Participated in the development and maintenance of daily functions/architecture (APM \ Crash \ Security) of Xiaohongshu App; The business is growing rapidly, the team is young and lively, and the technical atmosphere is strong. Recommendations or resumes can be sent directly to [email protected].

  • Beijing – Baidu web disk continues to recruit iOS development: social recruitment, fresh year, internship can be. The project was technically challenging and the team’s technical atmosphere was excellent. Sincerely hope that all the gods come to learn, but also welcome a good computer foundation to learn together. Resume email [email protected], temporarily also welcome micro blog private message @xiaofei 86 chat ~

  • Beijing – Ant Financial wants iOS/ Android/front-end development: responsible for alipay membership and account business line, located in Beijing International Trade, 100 meters from the exit of Jintai Xizhao subway station. Interested students welcome to send your resume to: [email protected]/[email protected] (the same mailbox) or micro blog private message @ Tu Fan er _ MSG to understand the situation.

  • Shanghai Jike: if you know a smart, hardworking, ambitious and ambitious engineer, come and join us! Any references or resumes can be sent directly to Jason (Immediate iOS Leader) at [email protected] or @jasonyuh on Twitter.

  • Since 2016, Qizhi Technology has entered the field of Internet of Things and artificial intelligence through collaborative workflow Mesh of industrial UAV, and successfully provided uav solutions for real estate, construction, surveying and mapping, power inspection and other industries. If you are interested, you can find out about it via private message @Zhuo, who has no story.

  • Shenzhen Toutiao R & D center sincerely invites all iOS masters to do pleasing projects together: If you want to know more information about Shenzhen Toutiao, you can add small T wechat: Tomtan, to discuss technology and feelings can oh ~~~~

  • Beijing Bytedance iOS team continues to recruit: you can send your resume to [email protected], or add me (@aidenrao) on wechat Jingmu1994 to learn more information about the company and the position.

  • Beijing Baidu Education Business Division recruiting iOS development: Baidu Education Business Division, location: Beijing West Erqi. There are baidu Reading, Baidu Library, Baidu Listening and other App products under the department. The team has a strong technical atmosphere. If you are interested, please send your resume to my email: [email protected].

  • Shenzhen – Glonhui iOS/Android/front-end: the direction of the company is to invest in research information, is steadily expanding, engineers at all levels are in demand. Any recommendation or resume can be sent to my email: [email protected], and you are also welcome to email me for more information.

Pay attention to our

We have opened an official account, and every issue will be released on the official account (OldDriverWeekly), welcome to follow.

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

The current editor

@Siniang, @Xiangerxiansen, @DamonWong, @Msg, @Zhang Jiafu, @Parsifal, @Aaaron7, @KYo, @TOM510230, @Anotheren, @Shuishui, @Looping, @lao Lao Lao Donkey, @Xiaofei 86, @Bonben, @red paper, @smiling drinking arsenic, @Jimq, @Lao Feng, @Zvving, @j_knight_

instructions

🚧 indicates the need to climb the wall, and 🌟 indicates the editor’s recommendation

Estimated reading time: 🐎 in a short time (1-10 mins); πŸ• medium (10-20 mins); 🐒 slow (20+ mins)