In order to increase people’s motivation to share high-quality articles with us, we made a small change. If the article is recommended to us by readers, we will announce the recommender at the end of the comment of the article, and you can bring a link of the recommender (blog or microblog is ok). For details, see here: an attempt to increase enthusiasm for feedback on technical articles. Welcome to the Issues to recommend more valuable information, articles, tools and so on can be submitted to us.

news

IPhone 8 motherboard replacement plan

Apple has determined that a very small number of iPhone 8 devices have a manufacturing defect on their motherboards. Affected devices may unexpectedly reboot, freeze their screens, or fail to power on. Apple will repair eligible devices free of charge. The affected devices were sold between September 2017 and March 2018 in Australia, China, Hong Kong SPECIAL Administrative Region, India, Japan, Macao Special Administrative Region, New Zealand and the United States. Check the serial number at this link to see if your iPhone 8 is eligible for the replacement plan.

The article

🐕 Practice type inference in Codable

Type inference is a powerful feature of Swift type security. This article describes how to use type inference to optimize the Codable API. After reading the article, you will have a better understanding of the application scenarios of type inference.

🐢 View and analyze iOS crash exceptions

The App developed by us will inevitably have flash backlogs. We can collect the flash backlogs by integrating some third-party flash backlogs collection systems or iTunesConnect itself. After the flash back log, not all the flash back can be quickly located to solve, especially without a clear context or no function or method can be directly located to the source code of the scene, this paper introduces several feasible ways to face this kind of flash back, especially through registers and assembly code to locate the problem.

🐢 🚧 🌟 Why Monads?

Those of you who are familiar with functional programming have more or less heard of Monad as a monstrous monstrous concept. It seems that there has never been an article that can explain this concept in human terms. For example, students of theory will say that Monad is a monoid on the category of functors. Haskell programmers will say that if we can define bind and return for a type, that type is a Monad, while Swift programmers generally assume that a flatmapped class is a Monad. It was a hoot. You can’t really go wrong, because every language is different.

This article is a great attempt to start with Monoid and use Swift’s language to give a more rigorous introduction to what Monad is and why we need it. Not only the maximum reduction of the academic definition, but also the practical use of Swift to achieve and combined with the actual example, is a rare good article, suitable for functional programming interested students study reading.

Another highlight of the article is that it points out the biggest difficulty in the popularization of functional programming: If we use the approach of revolution to learn functional programming from simple practice, we will find that there are many alternatives and it is easy to question the significance of FP. On the other hand, deductive approach, which is to fall into practice from theory, faces a steep theoretical learning curve. The author believes that learning FP well, live with them, will have a great gain ona person’s programming ideas and methods, so in the attempt to do the theory and practice of Monad introduction, from this article he did, really for Swift can have such a developer happy.

From the professional degree of this paper, the degree of theoretical restoration and the mining of Swift language features, it can basically mark that Swift has entered the camp of the mainstream functional programming language, and it is not long before it will compete with Scala, Haskell, OCaml and other competitors. Finally, I will conclude with a sentence from the author’s original text: I hope I was able to shed some light on why, once upon a time, someone even considered applying mathematical concepts like monads to programming, and on why these structure are useful in solving practical programming problems: Now it’s up to the reader to consider taking this leap.

🐢 🌟 Google Swift Style Guide Condensed edition

Google’s Swift Style Guide is one of the most useful guides available today. Every developer using Swift should learn something from this. At the same time, I also translated the official Swift API design specification, those who are interested in the specification can also read it together.

🐕 Improving Your Build Time in Xcode 10

Session 408 of this year’s WWDC was on how to speed up compilation in Xcode. Link to the video here. It is highly recommended that those of you who suffer from slow compilations in real projects take a moment to take a look.

This article concludes Session 408, which is a great resource for those of you who don’t have time to go through the video.

🐢 Dynamic Features in Swift

Swift has always been known for its static language, type safety, compiler checking and other features. In fact, it is precisely because of these advantages that OC cannot achieve that Apple is willing to create a new language besides OC and vigorously promote it. But that doesn’t mean Swift has to be static, as long as it has a concise syntax and the safest possible way to call, Swift can have some dynamic features. Raywenderlich, an old friend of iOS engineers, looks at some of the dynamic features in Swift, including Mirror, KeyPath, and KVO, There is even a new feature in Swift 4.2, @dynamicMemberLookup, that gives developers more options to fulfill more flexible requirements while enjoying Swift type security.

🐢 Create a time gate App in ARKit

This article, translated from sections 7, 8, and 9 of Ray Wenderlich’s free book ARKit by Tutorials, shows you how to build an immersive portal app using ARKit. The Time Gate app is a virtual door that is placed on the ground in the real world leading to another room. You can walk in and out of the room and explore its contents.

This article is recommended by the translator Prehistoric totem.

🐎 A high-performance, real-time key-value persistence component of iOS

FastKV is a key-value component of MMKV implemented by wechat team. The bottom layer also uses Mmap, and the top layer data serialization is implemented without relying on Protobuf. It is true that mmap performs better than NSUserDefaults in pure read and write performance, but mmap has its limitations. It requires an integer multiple of the physical page size (page_size), requires contiguity of memory, and requires its own mapping, data structure maintenance, and exception handling. This is equivalent to the extra cost of improving performance. As the author himself said at the end of the article, “For projects with low real-time requirements, we recommend using official NSUserDefaults”. Interested students can work with the authors to maintain this component, or learn and implement a similar key-vale component on their own.

🐢 Life of a Pixel 2018

Life of Pixels 2018, by Steve Kobes, talks about how to go from an HTML file to a screen display. The front end or interested in typography is recommended. It’s a very complicated process to go from Dom to Display. Analysis, typesetting, rendering, structural design under each link, and collaboration with GPU are all mentioned in the sharing. This will give us a general idea of what Chromium’s page looks like, and it will look easier with video without reading text. Share the PPT link used

🐎 When You Refactor, Are You Using Small Steps ?

The principle of Take smaller Steps for refactoring is introduced, and the author has posted his example of moving placeholder text from ViewController to ViewModel to illustrate the whole process of refactoring in smaller steps. And came up with a very good conclusion: true refactoring happens incrementally, and each step is verified by unit tests. Trust the text to help you with your refactoring.

🐎 Chatting Flutter

Cross-platform has always been the goal of continuous pursuit of everyone. Originally, Web was perfect as a cross-platform solution, but the compatibility of historical code, CSS is too complex, DOM interface granularity and other problems caused by the cross-platform solution under Web technology has obvious performance problems. Flutter, on the other hand, is based on a stripse-down version of the Web engine, discarding compatibility and preserving only the main features, and performing much faster. Although Flutter has some problems with package size and lack of dynamics, it is a complete engine much simpler than WebKit, and the source code is well worth learning.

🐕 Enum iterations in Swift 4.2

Swift 4.2 brings us the new CaseIterable protocol, which allows us to quickly fetch all cases in an Enum. Even more convenient than Codable, you can expand existing Enos directly. The Enum Maps section of this article shows us some interesting uses of CaseIterable, and you’ll soon love the new protocol as well.

🐢 dyld_link & load 和 dyld_startupparsing

These two articles systematically and comprehensively explore dyLD loading, linking, bootstrap, and more at the source level. The article filters the original process, catches the big and lets go the small, simply and clearly expounds the principle, and posts the simplified pseudo-code, which is very readable.

This post was contributed by @mrRiddler.

🐕 TCP isn’t that hard, is it?

This document describes the TCP handshake and wave in detail to help you better understand and master the reliable network protocol design process

  1. The TCP connection itself takes 4 steps (client request, server confirmation, server request, client confirmation), and after combining steps 2 and 3, it becomes the 3 step process we know today
  2. TCP state machine will help us better understand the various abnormal state flow process in the process of establishing a connection, through the state machine model can intuitively express the various details of the complex process
  3. TCP terminating a connection also obviously requires 4 steps (client terminating, server confirming, server terminating, server confirming), but steps 2 and 3 cannot be combined under this process

Wireshark Analysis is As Simple as This and The Art of Wireshark Analysis. The author of the book with the help of Wireshark this “artifact”, in-depth development of a variety of difficult problems, cocooncocoon, talk, is to understand the computer network programming very good reference book.

🐎 NSDataAsset

Asset can be used to store @2x, @3x image resources, which can be packaged into app Stochastic files on different devices. As of iOS 9, Asset supports not only image resources but also data formats. This article demonstrates how to use NSDataAsset.

🐎 Xcode 10 Storyboard Changes

Xcode 10 is about to be released, so it’s worth checking out the new changes. This article does not list all of the changes, but highlights some of the changes to the Interface Builder Interface as follows:

  • The floating Library, controls, and resources window is no longer attached to the bottom right corner, but a floating window.
  • The multi-function Embed in button replaces the original StackView button, and also adds Embed ViewControllers

Of course, Xcode 10 also has a lot of other updates. If you’re interested, take a look at What’s New in Xcode

🐕 Objective-c: Write testable code

This article explains how to write testable code. This paper mainly expounds the role of dependency injection and minimum knowledge principle in writing testability code, and how to make good use of them to write readable and testability code.

🐕 UI automation testing: Speed up your client UI testing with Appium

This article describes how to write a complete UI test case using Appium, an open source UI test framework that exposes a complete set of REST apis for iOS and Android testing. There are many languages to choose from when writing tests with Appium, such as Ruby, Python, and so on.

tool

Mermaid, a tool for generating structure diagrams

The article introduced a software called Sfear.Avi, which provides a framework for writing flowcharts directly with a certain syntax. It’s perfect for programmers, and now supports flowcharts, sequence diagrams, and Gantt diagrams (think of those ugly days of drawing flowcharts by hand). In addition, Mermaid supports direct integration with Gitbook, and since Mermaid itself is exported as an SVG file, it works well with other Web scenarios.

Software is good software, but this article is a little too simple, we suggest you go directly to the official address to view learning.

code

Arkit-based iOS unlimited screen implementation, restore hammer release effect

The author modified SpringBoard. App in jailbreak environment and obtained the relative displacement of mobile phone through ARKit inertial navigation algorithm, and then rendered a virtual space much larger than the mobile phone screen, so as to achieve the infinite screen mode of iOS desktop, so that when the viewport is shifted, the effect of traveling on the infinite screen is generated. Even if you don’t have a jailbreak environment, this article can be used to modify your own app, such as a left, right, up and down map, PDF reader, etc.

book

How to Interview for iOS

The paper book has been popular for more than a month, and now the electronic version is officially available at a 50% discount. Now is the best time for those who love electronic versions.

push

  • 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 this 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].

Pay attention to our

We have opened an official account, which will push messages when each issue is released. Welcome to follow it.

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

The current editor

@No story zhuo students, @Siniang, @Xiang Erxiansen, @DamonWong, @Torturous fan _ MSG, @Zhang Jiafu, @Aidenrao, @Parsifal, @Aaaron7, @Fang Qiulong, KYO, TOM510230, Anotheren, Shuishui, Looping, @jasonyuh, @old old old old donkey

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)