This article is for recording the resources which I collected together about how to gracefully use swift, an language released by Apple in 2014. Hopefully this post will help you.

Projects

As with other people who are newcomers to swift, I will start with reading source code by authors who are exprienced. The following projects are with my comments to explain what it is doing.

  • Recordings: It is for Swift 5 and iOS 13 and contains serveral examples under different app architectures, you may visit Github to see more details. Credits: ObjC China

Serialization: Encoding & Decoding

Although Apple Development Documentation is a great reference, it is not for the newbies. You may refer to this PDF if you want to learn what is it and how it works.

Automatic Reference Counting (ARC)

For beginner, it is a tricky thing to deal with reference counting, although it's easier compared to the situation without ARC. As a result, it causes Strong Reference Cycles if mishandled. There are some posts to describe what is ARC and whether you need [weak self] or [unowned self] in a closure entirely and detailedly:

StackView

UIStackView is a useful component for iOS/macOS developor, and it makes your app more flexible, here are some tutorials for those who are not familiar with:

App's Life Cycle (for iOS13)

Official documentations

Unofficial documentations

Getter & Setter

Package Management

Get start

Error of embeded framework in Xcode 11

Multiple commands produce 'xxx.framework':
1) Target 'xxx' has copy command from 'xxx.framework' to 'xxx.framework'
2) That command depends on command in Target 'xxx': script phase “Run Script”

Reactive Programming

RxSwift & RxCocoa