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.

news

Swift Server Working Group

The Swift Server Working Group is now officially moving into the next phase, with the goal of building a healthy ecosystem where developers can easily find high-quality libraries and tools. The task force was set up in 2016 with the goal of creating a common underlying API for use by the upper-level Swift server framework, swift-NIO, so what does it actually do next?

Similar to the core development team of Swift, this working group will be responsible for providing the overall technical direction and formulating standards, and building a series of server-side ecosystem around Swift Server. The members of the working group include engineers from Apple, IBM and Vapor, who will also actively participate in the development. We also hope that the community can participate in this process. Currently, the working group has listed a draft in the forum to describe the direction of future work, including toolchain, Database Driver, distributed system architecture, etc.

BTW, Swift official website puts Server Work Group in the column of Focus Areas, showing that it attaches importance to the Server side. (Also in the same column is ABI Stability)

From October 3rd all apps must have a privacy policy link in App Store Connect

Starting October 3, all new and updated apps will be required to have a privacy policy link in App Store Connect. Privacy policies must clearly and plainly inform users about what data their apps collect, how the collected data will be used under their privacy agreements, and whether third parties have access to the data.

The article

πŸ• Early returning functions in Swift

Early Return, as the name suggests, means Return Early. The author points out that when we do some branching logic, the combination of guard to directly return function when conditions are not met can make our code clearer and easier to debug. However, I personally think that for similar logic, a more reasonable logic would be to use do{} while(false) and break if the condition is not met. This ensures that the function has a single exit point and is more maintainable. In addition to Early returns, the article recommends using functions to encapsulate complex conditional judgments and make code more readable.

Generally speaking, the depth of the article is general, but the case discussed is more interesting, you can have a look.

🐎 TODO FIXME And Compiler Directives

Swift 4.2 added two new compiler commands, #warning(“message”) and #error(“message”), to cause your code to generate warnings and errors when compiled.

🐎 Several ways for iOS apps to connect to peripherals

If you’re developing an app that interacts with hardware, it’s important to know how many ways your iOS app can connect to it.

  • Wireless connection is very common in daily life bluetooth, WIFi.
  • The line is divided into two groups:
    • MFI: Apple certified peripheral. The real son CarPlay is a special NCM. Other peripherals are based on External Accessory Protocol, by introducing ExternalAccessory. The framework of communication. But the bar for MFI applications is very high.
    • There is no USB hotspot sharing for eggs.

Spirit – JSB is recommended

🐎 How can iOS accurately restore multiple lines of text spacing in UI draft

You must have encountered the problem of how to accurately restore the text spacing in the development, whether it is PhotoShop + annotation tool or Sketch. This paper introduces how to restore multi-line text spacing perfectly by setting minimumLineHeight maximumLineHeight and using baselineOffset correction.

🐎 Why you’re not supposed to call description

When you use Swift, you will often print arbitrary strings, integers, or objects to the console as part of the debugging information. May you noticed CustomStringConvertible and CustomDebugStringConvertible these two protocols, and String (describing:) but don’t know what’s the difference. In this article, the author explains what these types do and why calling String(describing:) and String(reflecting:) when used is the best choice.

🐎 Practical Dynamic Type

Before the iOS 11, if you want to according to the iOS system font size to dynamically adjust the font size, can only watch UIContentSizeCategoryDidChange, and manually render view when changes occur. However, iOS 11 has introduced some improvements that make it easier for apps to develop assistive features for visually impaired users. In this article, the author shows how to actually take advantage of iOS 11’s improvements to Dynamic Type to provide full assistive features for visually impaired users, while still supporting previous iOS versions.

🐎 IOS App background task pit

Peak has been researching and sharing Background Crash knowledge recently, such as the “iOS App Background Crash Investigation” featured in its weekly magazine 32. This article is a summary of his recent research results. As mentioned in the paper, Crash involving Background Task mainly falls into the following three types:

  • 0xdead10cc – In order to ensure the integrity of the operation on the DB by Extension and Host App, the system forcibly kills the application;
  • 0xbada5e47 – Launching too many Background tasks or Background tasks that call expiry Handler for more than a few seconds after expiry will be forcibly killed by the system;
  • 0x8BadF00D – The main thread is stuck and is forcibly killed by the system WatchDog.

In addition, such Crash can not be captured by the third-party collection framework, so you need to use the Crash logs of Apple to troubleshoot the Crash.

🐎 Build a highly scalable iOS KeyValueStore

This article explains how to build a highly extensible iOS KeyValueStore step by step. From the beginning of a Key, a Data table, step-by-step explain how to support storage metadata, grouping, index. Fluent prose, no nonsense, worth a look.

🐒 MacOS’s Security and Privacy Guide

This article is translated from an article by DrDUh, macOS Security and Privacy Guide. Nowadays, the security and privacy of users’ computers have been paid more and more attention, no matter for companies or individuals. This article is helpful for those who want to improve the security and privacy of their Mac. This article discusses the security and privacy issues of MacOS from Web, VPN, firewall, system services, etc. After reading this article, I believe that many questions in this area can be solved easily.

🐎 Swift Knowledge Base updates for Swift 4.2

The official Swift 4.2 release is just a few days away, and although this update is only a small version, it still brings a number of useful new features, which are recommended for those who haven’t had a chance to check out this article.

🐎 Hacking Hit Tests

Here’s an article from Soroush Khanlou. This article introduces HitTest, an almost forgotten method from UIKit.

In certain cases, the developer may need to Override the HitTest method for specific purposes. The author encountered a similar situation. Override HitTest, in many cases, opens up more possibilities for development. If you have a better understanding of HitTest, you will also have a better understanding of iOS development.

🐒 CLI: improved

The author of this article shares some of his experiences with command line tools to help you improve your work efficiency

  • catUpgrade tool for
    1. You can useccatCome to the rightcatThe results are classified by color
    2. You can usebatCome to the rightcatResults for secondary retrieval and paging
  • pingUpgrade tool for
    1. You can use prettyping, which wraps a GUI around the result ping returns
  • ctrl+rUpgrade tool that retraces past commands entered
    1. You can use FZF for better backtracking
  • topUpgrade tool for
    1. You can use htop to get more interactive commands to display system hardware information
  • findUpgrade tool for
    1. You can use Alfred, an app that helps you retrieve files better
    2. You can use FD for better file retrieval
  • duUpgrade tool for
    1. You can use ncdu, which works better with iTerm2
    2. You can use NNN, a high performance tool for disk space management
  • manUpgrade tool for
    1. You can use TLDR to read help documents better
  • grepUpgrade tool for
    1. Sometimes,grepFor complex filtering rules, this time can be consideredack || agTo take the place of
  • grep et alUpgrade tool for
    1. You can use JQ to better handle json conversions
  • More and better tools are waiting to be discovered
    1. ponysayalternativecowsay
    2. csvkitalternativeawk et al
    3. notialternativedisplay notification
    4. entralternativewatch

design

πŸ• Lessons Learned From the RWDevCon 2018 Design Lab

In the Design Lab at RWDevCon 2018, two experienced UI/UX designers answered Ray Wenderlich readers’ questions about app Design, including a number of common solutions that fall into the following four categories: Gestalt theory, native components and behavior, competitive product research and product writing. Reading this article can help you avoid making the same mistakes when building mobile apps.

book

Mac Efficient Development Guide

Bestswifter has always attached great importance to work efficiency. This book aims to create an efficient workflow from the aspects of system configuration, Mac workflow, God of editors: Vim, Git from entry to advance, and Zsh, the ultimate weapon. It is a practical manual dedicated to improving Mac work efficiency. Whether you’re a beginner or an experienced player, you can learn a lot about productivity from this book that you wouldn’t normally notice. When you become more productive, you will have more time to improve yourself.

Audio and video

Podcasts technology video

Docker manages changes to the container in a Git-like manner, which means you can “commit” changes, view a history of changes, and create new images.

How to automate the image customization process with Dockerfile automated image Building? You can write the action of each step in the Dockerfile, and then execute the Docker build.

In this video, we create an image that can execute any version of Swift based on the binary program provided by Swift. With this image, we can more easily and safely experiment with various new Swift features. [Video link]

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)