Core Data in Swift


Book Description

Core Data is intricate, powerful, and necessary. Discover the powerful capabilities integrated into Core Data, and how to use Core Data in your iOS and OS X projects. All examples are current for OS X El Capitan, iOS 9, and the latest release of Core Data. All the code is written in Swift, including numerous examples of how best to integrate Core Data with Apple's newest programming language. Core Data expert Marcus Zarra walks you through a fully developed application based around the Core Data APIs. You'll build on this application throughout the book, learning key Core Data elements such as NSPredicate, NSFetchRequest, thread management, and memory management. Start with the basics of Core Data and learn how to use it to develop your application. Then delve deep into the API details. Explore how to get Core Data integrated into your application properly, and work with this flexible API to create convenience methods to improve your application's maintainability. Reduce your migration difficulties, integrate your Core Data app with iCloud and Watch Kit, and use Core Data in a queue-based environment. By the end of the book, you'll have built a full-featured application, gained a complete understanding of Core Data, and learned how to integrate your application into the iPhone/iPad platform. This book is based on Core Data in Objective-C, Third Edition. It focuses on Swift and adds an additional chapter on how to integrate Core Data with an efficient network implementation, with best practices on how to load and pre-load data into your Swift application. What You Need: Mac OS X El Capitan and iOS 9 and a basic working knowledge of Swift




Core Data by Tutorials (Eighth Edition)


Book Description

Learn Core Data With Swift!Take control of your data in iOS apps using Core Data, through a series of high quality hands-on tutorials.Start with the basics like setting up your own Core Data Stack all the way to advanced topics like migration, performance, multithreading, and more! By the end of this book, you'll have hands-on experience with Core Data and will be ready to use it in your own apps.Who This Book Is For:This book is for intermediate iOS developers who already know the basics of iOS and Swift development but want to learn how to use Core Data to save data in their apps.Topics Covered in Core Data by Tutorials:Your First Core Data App: You'll click File\New Project and write a Core Data app from scratch!NSManagedObject Subclasses: Learn how to create your own subclasses of NSManagedObject - the base data storage class in Core Data.The Core Data Stack: Learn how the main objects in Core Data work together, so you can move from the starter Xcode template to your own system.Intermediate Fetching: This chapter covers how to fetch data with Core Data - fetch requests, predicates, sorting and asynchronous fetching.NSFetchedResultsController: Learn how to make Core Data play nicely with table views using NSFetchedResultsController!Versioning and Migration: In this chapter, you'll learn how to migrate your user's data as they upgrade through different versions of your data model.Unit Tests: In this chapter, you'll learn how to set up a test environment for Core Data and see examples of how to test your models.Measuring and Boosting Performance: Learn how to measure your app's performance with various Xcode tools and deal with slow spots in your code.Multiple Managed Object Contexts: Learn how multiple managed object contexts can improve performance and make for cleaner code.Core Data and CloudKit: Learn how to synchronize Core Data across all of a user's devices.




IOS 10 Swift Programming Cookbook


Book Description

Ready to build truly stunning apps for iPhone, iPad, and Apple Watch? This cookbook—written exclusively in Swift 3—provides more than 120 proven solutions for tackling the latest features in iOS 10 and watchOS 3. With these code-rich recipes, you’ll learn how to build dynamic voice interfaces with Siri and messaging apps with iMessage. You’ll also learn how to use interactive maps, multitasking functionality, the UI Testing framework, and many other features. This cookbook is ideal for intermediate and advanced iOS developers looking to work with the newest versions of Apple’s mobile operating systems. Each recipe includes reusable code that's available on GitHub, so you can put it to work right away. Let users interact with your apps and services through Siri Write your own iMessage extensions that allow added interactivity Work with features in Swift 3, Xcode 8, and Interface Builder Build standalone apps for Apple Watch Create vibrant user interfaces with new UIKit features Use Spotlight APIs to make your app content searchable Add Picture in Picture playback functionality to iPad apps Take advantage of MapKit and Core Location updates Use Apple’s new UI Testing framework Liven up your UI with gravity and turbulence fields




Core Data with SwiftUI


Book Description

Quick Guides for Masterminds are excerpts from our best-selling books SwiftUI for Masterminds, UIKit for Masterminds, and HTML5 for Masterminds, providing a cost-effective alternative to getting the information you need. Description With this guide, you will learn how to store data in a database with Core Data and the SwiftUI framework. After reading this guide, you will know how to work with the Core Data framework, how to create and manage a database, and how to store, search, and retrieve information from the user's device. Swift 5.6 | iOS 15 | Xcode 13 Table of Contents CORE DATA Data Model Core Data Stack Managed Objects Fetch Request Asynchronous Access Core Data Application Previews Sort Descriptors Predicates Delete Objects Modify Objects Custom Fetch Requests Sections To-Many Relationships This guide assumes that you have a basic knowledge of app development, Xcode, and the Swift language. You should also know how to create and display basic SwiftUI views. For a complete course on app development with SwiftUI, read our book SwiftUI for Masterminds. This guide is a collection of excerpts from the book SwiftUI for Masterminds. The information included in this guide will help you understand a particular aspect of app development, but it will not teach you everything you need to know to develop an app for Apple devices. If you are looking for a complete course on app development with SwiftUI, read our book SwiftUI for Masterminds. For more information, visit our website at www.formasterminds.com.




Thinking in SwiftUI


Book Description

SwiftUI is radically different from UIKit. So in this short book, we will help you build a mental model of how SwiftUI works. We explain the most important concepts in detail, and we follow them up with exercises to give you hands-on experience.SwiftUI is still a young framework, and as such, we don't believe it's appropriate to write a complete reference. Instead, this book focuses on transitioning your way of thinking from the object-oriented style of UIKit to the declarative style of SwiftUI.Thinking in SwiftUI is geared toward readers who are familiar with Swift and who have experience building apps in frameworks like UIKit.




Concurrency by Tutorials (Third Edition)


Book Description

Dive into Concurrency in iOS!Concurrency is the concept of multiple things, or pieces of work, running at the same time. With the addition of CPU cores in our devices, knowing how to properly utilize your customer's hardware to the maximum is absolutely a must. Unfortunately, proper concurrency in iOS apps is one of the lesser-known, lower-level topics, that every developer wants to (and should) understand properly, but is usually intimidated by.This is where Concurrency by Tutorials comes to the rescue! In this book, you'll learn everything there is to know about how to write performant and concurrent code for your iOS apps. Who This Book Is ForThis book is for intermediate iOS developers who already know the basics of iOS and Swift development but want to enrich their knowledge, learning more about how to efficiently perform tasks without affecting the performance of their app, and how to properly divide work to utilize hardware to the fullest extent.Topics Covered in Concurrency by TutorialsWhat & Why: Learn what is Concurrency and why would you even want to utilize it in your apps?Grand Central Dispatch: Learn about Apple's implementation of C's libdispatch, also known as GCD, it's one of the simplest ways to queue up tasks to be run in parallel.Operations & Operation Queues: When GCD doesn't quite cut it, you'll learn how to further customize and reuse your concurrent work using Operations and Operation Queues.Common Concurrency Problems: Learn about some of the problems you could face while developing concurrent applications, such as Race Conditions, Deadlocks, and more.Threads & Thread Sanitizer: Understand various threading-related concepts and how these connect to the knowledge you've accumulated throughout this book. You'll also learn how to use Thread Sanitizer to ease your debugging when things go wrong.This book is sure to make you a pro in building concurrent and performant applications, and finally understanding how these lower-level APIs work to the fullest, pushing your app to the top!




Combine: Asynchronous Programming with Swift


Book Description

Dive into Combine!Writing asynchronous code can be challenging, with a variety of possible interfaces to represent, perform and consume asynchronous work - delegates, notification center, KVO, closures, etc. Juggling all of these different mechanisms can be somewhat overwhelming. Does it have to be this hard? Not anymore!In this book, you'll learn about Combine - Apple's framework to work with asynchronous events in a unified and reactive way that ensures your app is always up to date based on the latest state of its data.Who This Book Is ForThis book is for intermediate iOS developers who already know the basics of iOS and Swift development but who are interested in taking their app and state management to the next level by learning declarative/reactive programming.You'll also enjoy this book if you're interested in SwiftUI, since many of the reactive capabilities keeping your SwiftUI views up-to-date are built on top of Combine.Topics Covered in Combine: Asynchronous Programming With SwiftWhat & Why: Learn what Combine and reactive programming are, the problems they solve and how you can unify all of your asynchronous pieces of work.Operators: Learn how to compose, transform, filter and otherwise manipulate different pieces of asynchronous work using operators.In Practice: Gain knowledge on various topics and techniques you'll leverage when writing your own real-life apps. You'll then practice these techniques with actual hands-on apps and projects.SwiftUI: Discover how Combine is deeply rooted within SwiftUI, providing it with the ability to reactively update its views based on the state of your app.Advanced Combine: Once you've got a handle on the basics, you'll dive into advanced Combine topics such as Error Handling, Schedulers, and Custom Publishers.By the end of this book, you'll be a pro in building full-fledged apps using Combine's various abilities.




SwiftUI for Masterminds 2nd Edition 2022


Book Description

Learn how to create apps for iOS 15 and macOS Monterey with Swift 5.5 and the SwiftUI 3 framework. SwiftUI for Masterminds is a complete course on how to create professional applications for iPhones, iPads and Mac computers. After reading this book, you will know how to program in Swift, how to design user interfaces with SwiftUI, and how to work with the most powerful frameworks available for app development. In this book we teach you how to build insanely great apps from scratch. Each chapter explores basic and complex concepts; from computer programming and the Swift programming language to database storage, iCloud data sharing, and everything you need to know to develop applications for Apple devices. The information is supported by practical examples that gradually introduce the technologies involved and make them accessible to everyone. SwiftUI for Masterminds was designed to prepare you for the future and was written for the genius in you, for Masterminds. Introduction to Swift 5.5 Swift Paradigm Swift Concurrency Declarative User Interfaces SwiftUI Framework Combine Framework Layout and Navigation Scroll Views UIKit in SwiftUI Lists and Grids Maps Graphics and Animations Files Archiving Core Data iCloud CloudKit Camera and Photo Library Video View Web View Gesture Recognizers Drag & Drop Timers Notifications Error Handling ...and more! iOS and Mac development with iOS 15, Xcode 13, Swift 5.5 and SwiftUI 3




SwiftUI Apprentice (First Edition)


Book Description

Learn iOS Development Using SwiftUIYou've heard about Apple's hot new declarative user interface SDK - SwiftUI - and are ready to try your hand at iOS development. But, you have no idea where to begin.SwiftUI Apprentice to the rescue! This book will guide you through the first steps of your journey as you learn to build beautiful iOS apps.Who This Book is ForThis book for developers who are new to iOS and SwiftUI who are looking for a step-by-step path to learning.Topics Covered in SwiftUI ApprenticeUsing Xcode: Learn how to use Xcode - Apple's integrated development environment - to code, build and debug your iOS apps.Planning and Prototyping: Learn how to plan and prototype apps using SwiftUI. Once you're happy with the prototype, you'll fill out the implementation into a full-featured app with a beautiful, professionally-designed user interface.Managing Assets: Discover how to manage app assets, such as colors and images, so your app looks good on all iOS devices from the smallest iPod Touch to the largest iPad.SwiftUI Data Flow: See how to manage data within a SwiftUI app so the user interface updates automatically as that data changes.Data Persistence: Explore multiple strategies for persisting an app's data. Understand the pros and cons of several approaches so you can decide the best solution for your own apps.Networking: Learn to access REST APIs so your app can use internet resources to enhance your app's user experience.One thing you can count on: After reading this book, you'll be prepared to create your own iOS apps using SwiftUI.




IOS Apprentice (Eighth Edition): Beginning IOS Development with Swift and UIKit


Book Description

Learn iPhone and iPad Programming via Tutorials! If you're new to iOS or Swift, or to programming in general, learning how to write an app can seem incredibly overwhelming. That's why you need a book that: Shows you how to write an app step-by-step. Has tons of illustrations and screenshots to make everything clear. Is written in a fun and easygoing manner! In this book, you will learn how to make your own iPhone and iPad apps, through four engaging, epic-length tutorials. These hands-on tutorials describe in full detail how to build a new app from scratch. Five tutorials, five apps. Each new app will be a little more advanced than the one before, and together they cover everything you need to know to make your own apps. By the end of the series you'll be experienced enough to turn your ideas into real apps that you can sell on the App Store.