Ever since WWDC, our team has been hard at work on three hotly anticipated new books on SwiftUI, Combine, and Catalyst:
We’re making great progress on the books. We’ll be releasing a big early access version in a few weeks, and we’re aiming for the full release this fall. But in the meantime, we wanted to give you a sneak peek — so today we’re releasing one chapter from each book!
Keep reading to learn more about these books and the author teams behind them, as well as how to get the sneak peek chapters.
1) SwiftUI by Tutorials
SwiftUI by Tutorials is designed to help you learn how to transition from the “old way” of building your app UI with UIKit, to the “new way” of building responsive UI with modern declarative syntas with SwiftUI.
This book is for readers who are comfortable building Swift apps, and want to make the exciting leap into building their app UI with modern, declarative code.
As a sneak peek, today we are releasing Chapter 2 from the book, which covers getting started with SwiftUI. You’ll learn the basics of using the SwiftUI canvas editor, and will create a basic user interface.
This is just a sneak peek so you can get a rough idea what the book will be like. The full book, coming this fall, will contain the following chapters:
- Introduction: In this chapter, you’ll get an overview of the book as a whole, as well as the apps you will be building as you learn the fundamentals of SwiftUI!
- Getting Started with SwiftUI: In this chapter, you’ll start to dig in and begin work on the RGBullsEye app, learning more SwiftUI terminology to help you build a UI directly in the preview, similar to using storyboard. You’ll also be introduced to Canvas, Views and Previews.
- Understanding SwiftUI: Learn the differences with the UIKit version to understand what replaces ViewController, and how you need to “think differently” about views, data and control. You’ll see the creation of a Game struct to learn how to use @ObjectBinding.
- Integrating SwiftUI: See the scene in the UIKit BullsEye app and replace the Info button with one that opens the color version of the game. You’ll then learn to navigate from that view back into the UIKit app using UIView[Controller]Representable.
- Introduction to Controls: Text & Image: In this chapter, you’ll learn about two of the most used controls, Text and Image, and how to customize them using modifiers.
- State & Data Flow: In this chapter, you’ll learn binding data to the UI, reactive updates to the UI through state management, and an in-depth usage of the attributes introduced in the SwiftUI introduction.
- Layouts & Presentations: In this chapter you’ll learn about other controls, like TextField, Button, Toggle, Slider, Stepper and pickers.
- Introducing Stacks: In this chapter you’ll learn how to use container controls, such as stacks, GroupBox, Form and Group.
- Lists & Navigation: In this chapter you’ll learn how to display lists of items, and how to navigate between views.
- Testing & Debugging: In this chapter, you will learn about creating user interface tests and debugging your app.
- Handling User Input: This chapter will cover user updates of the interface, including how to easily test a SwiftUI interface, how to manage the flow of screens throughout a complex app, and how to deal with gestures, including the development of a custom gesture.
- Drawing & Custom Graphics: In this chapter, you will learn how to create drawings and graphics in your app.
- Animations & Transitions: In this chapter, you will learn how to use animations and view transitions in your app.
- Complex Interfaces: In this chapter, you will learn how to use existing custom controls from SwiftUI and how to build complex interfaces in Swift.
- Expanding the UI: This chapter will cover some of the more advanced (but necessary) considerations when developing mobile applications, including various inclusive accessibility approaches, the updates to fonts, text scaling, and SF symbols, and how to manage multi-language apps.
- Frameworks: In this chapter, see the differences between each platform, focusing on how to make best use of the device, its unique features and its way to handle input. The app developed in Chapters 4 and 6 will be used here to show how it can be customized in order to make better use of the platform it runs on.
We’ll be having another early access release of the book with more chapters in a few weeks. Stay tuned!
Antonio Bello is an author of this book. Antonio has spent most of his life writing code, and he’s gained a lot of experience in several languages and technologies. A few years ago he fell in love with iOS development, and that’s what he mostly works on since then, although he’s always open for challenges and for playing with new toys. He believes that reputation is the most important skill in his job, and that “it cannot be done” actually means “it can be done, but it’s not economically convenient.” When he’s not working, he’s probably playing drums or making songs in his small, but well fitted home recording studio.
Phil Laszkowicz is an author of this book. Phil’s been delivering large-scale software solutions for many years, as well as working with startups as a board member, mentor, and coach. He’s worked with neural networks for over a decade and enjoys combining deep learning with intuitive and elegant user experiences across mobile and web. In his spare time, he writes music, drinks coffee at a professional level, and can be found scaling cliff walls, composing music, sea kayaking, or taking part in competitive archery.
Bill Morefield is an author of this book. Bill has spent most of his professional life writing code. At some point, he has worked in almost every language other than COBOL. He bought his first Apple computer to learn to program for the iPhone and got hooked on the platform. He manages the web and mobile development team for a college in Tennessee, where he still gets to write code. When not attached to a keyboard he enjoys hiking and photography.
Audrey Tam is an author of this book. As a retired computer science academic, she’s a technology generalist with expertise in translating new knowledge into learning materials. Audrey now teaches short courses in iOS app development to non-programmers and attends nearly all Melbourne Cocoaheads monthly meetings. She also enjoys long train journeys, knitting, and trekking in the Aussie wilderness.
2) Combine: Asynchronous Programming with Swift
Third-party reactive frameworks including RxSwift and ReactiveSwift have been revolutionizing how apps are built. With Apple’s introduction of the Combine framework, it is now possible to apply these same declarative and reactive programming techniques without third-party library dependencies — it’s a real game-changer!
This book is for people who have experience with Swift. Knowledge of other reactive programming libraries may be useful but is not necessary, because the book will cover everything from the ground up.
In today’s sneak peek, we are releasing Chapter 2 of the book, which shows you how to work with publishers and subscribers, and manage the subscriptions that are created between the two of them.
Again this is just a preview of what’s coming soon to tide you over; the full book will have much more. Here’s the full table of contents:
- Hello Combine: A gentle introduction to what kind of problems Combine solves, a back story of the roots of reactive programming on Apple’s platforms, and a crash course into the basic moving pieces of the framework.
- Publishers & Subscribers: The essence of Combine is that publishers send values to subscribers. In this chapter you’ll learn all about what that means and how to work with publishers and subscribers, and manage the subscriptions that are created between the two of them.
- Transforming Operators: Before a subscriber receives values from a publisher, you’ll often want to manipulate those values in some way. One of the most common things you’ll want to do is transform those values into some form that is ideal for use by the subscriber. By the end of this chapter you’ll be transforming all the things.
- Filtering Operators: In this chapter you’ll learn about filtering elements from Combine publishers, so you can easily control the values published by the upstream and only deal with the ones you care about.
- Combining Operators: Publishers are extremely powerful, but they’re even more powerful when composed together! This chapter will teach you about Combine’s combining operators which let you take multiple streams and create meaningful logical relationships between them.
- Time-based Operators: A large part of asynchronous programming relating to processing values over time, this chapter goes into the details of performing complex time-based tasks that would be hard to do without Combine.
- Sequence Operators: When you think about it, Publishers are merely sequences. As such, there are many useful operators that let you target specific elements, or gather information about the sequence as a whole, which you’ll learn about in this chapter.
- In Practice: Building a Collage app: It’s time to try your new Combine skills in a real project and learn how to make Foundation and UIKit play along with your reactive code.
- Combine for Networking: This chapter teaches you how to seamlessly integrate network requests in Combine publisher chains and make your networking easier and more resilient.
- Debugging Combine: Debugging asynchronous code being notoriously harder linear code, Combine helps with a few tools that will greatly help you improve your understanding of the processes at play.
- Combine Timers: A niche part of your code, timers are always useful to have around and easy to create in Combine, as you’ll learn in this chapter.
- Key-Value Observing: This chapter shows you how Key-Value Observing, which was historically the best way to get notified when a value changed, now integrates nicely with Combine publishers.
- Resources in Combine: Precisely controlling resource usage is a touchy subject, but this chapter will shed light on sharing operators which let you do just that.
- In Practice:Networking: In this chapter, you will work on a networking API that talks in real-time to the Hacker News servers and along the way exercise using multiple operators and publishers in Foundation.
- In Practice: SwiftUI with Combine: SwiftUI is the new user interface paradigm from Apple and it’s designed for an interplay with Combine on a whole new level. In this chapter, you are going to work through a Combine based SwiftUI project.
- Error Handling in Practice: This chapter will teach about Combine’s powerful typed error system, and how you can leverage it to handle errors in your app, and within Combine publishers.
- Combine Schedulers: In this chapter, you’ll learn what Schedulers are, how they relate to RunLoops, Dispatch queues and Threads and how Combine extends Foundation to integrate with them.
- Custom Publishers & Handling Backpressure: Creating your own publishers and operators is an advanced topic you’ll learn to master in this chapter, while also learning about and experimenting with backpressure management.
- Testing Combine Code: This chapter will introduce you to unit testing techniques for use with Combine code. You’ll go from testing basics in a playground to applying what you’ve learned in adding tests to an existing iOS app project.
- In Practice: A Complete Combine App: You’ve gained valuable skills throughout this book, and in the last section you picked up some advanced Combine know-how too. In this final chapter, the pièce de résistance, you’ll build a complete app that applies what you’ve learned—but the learning is not done yet! Core Data in Combine anyone?
Section I: Introduction to Combine
Section II: Operators
Section III: Combine in Practice
Section IV: Advanced Combine
Section V: Building a Complete App
Marin Todorov is an author of this book. Marin is one of the founding members of the raywenderlich.com team and has worked on eight of the team’s books. He’s an independent contractor and has worked for clients like Roche, Realm, and others. Besides crafting code, Marin also enjoys blogging, teaching and speaking at conferences. He happily open-sources code. You can find out more about Marin at www.underplot.com.
Shai Mishali is an author and the final pass editor on this book. He’s the iOS Tech Lead for Gett, the global on-demand mobility company; as well as an international speaker, and a highly active open-source contributor and maintainer on several high-profile projects – namely, the RxSwift Community and RxSwift projects, but also releases many open-source endeavors around Combine such as CombineCocoa, RxCombine and more. As an avid enthusiast of hackathons, Shai took 1st place at BattleHack Tel-Aviv 2014, BattleHack World Finals San Jose 2014, and Ford’s Developer Challenge Tel-Aviv 2015. You can find him on GitHub and Twitter @freak4pc.
Scott Gardner is an author and the technical editor for this book. Combined, he’s authored over a dozen books, video courses, tutorials, and articles on Swift and iOS app development — with a focus on reactive programming. He’s also presented at numerous conferences. Additionally, Scott teaches app development and is an Apple Certified Trainer for Swift and iOS. Scott has been developing iOS apps since 2010, ranging from personal apps that have won awards to working on enterprise teams developing apps that serve millions of users. Say hello to Scott on Twitter @scotteg or connect with him on LinkedIn at scotteg.com.
Florent Pillet is an author of this book. He has been developing for mobile platforms since the last century and moved to iOS on day 1. He adopted reactive programming before Swift was announced, using it in production since 2015. A freelance developer, Florent also uses reactive programming on the server side as well as on Android and likes working on tools for developers like the popular NSLogger when he’s not contracting, training or reviewing code for clients worldwide. Say hello to Florent on Twitter and GitHub at @fpillet.
3) Catalyst by Tutorials
Catalyst by Tutorials shows you how to take all of those great apps you’ve build on iOS and run them right on macOS. But like everything else with Apple, it’s not always as straightforward as you’d like it to be.
This book will show you how to design your apps to work well on macOS, what you can and can’t port between the two platforms, and any other “gotchas” to keep an eye out for when building apps under Catalyst.
This book is for developers who have a good handle on building iOS apps and want to learn how to port those apps to run on macOS as well.
In today’s sneak peek, we’re releasing Chapter 1 from the book. In this chapter, you’ll learn how to get started porting an iOS app to macOS, and you’ll learn what features you get for free, and what features don’t work quite as well out-of-the-box (i.e. what we’ll be covering in the rest of the book).
This is just one of the 14 chapters that will be in the final book, coming this fall:
Section 1: Making a Great iPad App
- The Checkbox: In this chapter, you’re going to get your first look at the sample app that you’ll be interacting with for the remainder of this book. Once you familiarize yourself with the basic functionality and architecture, you’ll take your first steps toward bringing the app to macOS.
- Migrating to Split View Controller: Here, learn why you should use Split View Controller and gain Instruction on how to migrate from iPhone-style Navigation Controller with master/detail push to Split View Controller.
- Drag & Drop: In this chapter, you’ll learn how to add support for dragging photos from other apps and dropping them into your app. You’ll also learn how to implement drag and drop for collection views with smooth animations and cell reordering.
- Setting the Scene(s): In this chapter, you’ll learn how to enable a feature that has been available since the beginning on the Mac, and has just arrived with iOS 13 on the iPad, multi-window support.
- Adding Some Context: In this chapter, you’re going to learn all about context menus, adding support for long-press menus on iPad and how those menus will automatically port to Mac.
- The Keyboard: In this chapter, learn how to use keyboard commands to navigate across a list and delete items, as well as the UIKeyCommand and setting first responder.
- Preferences & Settings Bundle: Learn layout preferences, and override individual items from dark mode, similar to Mail.app and the reader pane.
- Making Your App Feel at Home on MacOS: In this chapter, you’re going to take things to the next level by making some adjustments that will really make your app shine when running on macOS via Catalyst. Throughout the rest of this section, you’ll go deeper on several other Mac-specific features. When you’re done, you’ll have the makings of a world-class Mac app.
- The Mouse: Use UIHoverGestureRecognizer to show a shadow effect when hovering over a diary entry in the sample app.
- Barista Training: Menu Bar: In this chapter, you’ll learn all about the menu bar by trimming the default menu bar, as well as adding new items to delete, share and add new diary entries.
- Barista Training: Toolbar: In this chapter, you’ll learn to customize the toolbar items, including Share, Insert and Print.
- Barista Training: Touch Bar: In this chapter, you’ll continue to develop your app by adding the toolbar items to the Touch Bar.
- App Store: In this chapter, you’ll read about the pros and cons of distributing on the Mac App Store, and learn how to go from Xcode all the way to a released app on the App Store.
- Third-Party Distribution: In this chapter, you’ll learn how to make sure everyone with macOS can run your app, as well as how to improve the installation experience for your potential users.
Section II: Making a Great Mac App
Section III: Distributing Your App
Andy Pereira is an author of this book. He is an iOS developer in Atlanta, GA. He enjoys traveling the world with his wife, learning new cultures, and playing guitar.
Nick Bonatsakis is an author of this book. He is an accomplished software engineer with over a decade of experience in mobile development across both Android and iOS. He is a passionate technologist, musician, father and husband. He currently works as an independent consultant under his own company, Velocity Raptor Inc.
Marin Benčević is an author of this book. He is a Swift and Unity developer who likes to work on cool iOS apps and games, nerd out about programming, learn new things and then blog about it. Mostly, though, he just causes SourceKit crashes. He also has a chubby cat.
Where to Go From Here?
Want to check out the sneak peek?
- If you already preordered the books, you can download them now – and stay tuned for the next EA release in a few weeks!
- If you didn’t preorder yet, consider ordering your copies now! The books are on currently on sale; you can get all 3 for just $99.
This sale is only available for a limited time, so be sure to grab it before it’s gone.
We hope you enjoy these sneak peeks, and stay tuned for another early access release soon!