Coder Social home page Coder Social logo

swiftui-cookbook's Introduction

SwiftUI Cookbook

SwiftUI Cookbook

This is the code repository for SwiftUI Cookbook, published by Packt.

Discover solutions and best practices to tackle the most common problems while building SwiftUI apps

What is this book about?

SwiftUI is an innovative and simple way to build beautiful user interfaces for all Apple platforms, right from iOS and macOS through to watchOS and tvOS, using the Swift programming language. In this recipe-based book, you’ll work with SwiftUI and explore a range of essential techniques and concepts that will help you through the development process. The recipes cover the foundations of SwiftUI, as well the new features of SwiftUI 2.0 introduced in iOS 14. A few recipes are addressed to make some new SwiftUI 2.0 components retrocompatible to iOS 13, such as the Map view or the Sign in With Apple View.

This book covers the following exciting features:

  • Explore various layout presentations in SwiftUI such as HStack, VStack, LazyHStack, LazyVGrid, and more
  • Create a cross platform app for iOS, macOS and watchOS
  • Get up to speed with drawings in SwiftUI by building shapes, custom paths, and polygons
  • Discover modern animation and transition techniques in SwiftUI
  • Add user authentication using Firebase and Sign In with Apple

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

if (test expression)
{
  Statement upon condition is true
}

Following is what you need for this book: This book is for mobile developers who want to learn SwiftUI as well as experienced iOS developers transitioning from UIKit to SwiftUI. The book assumes basic knowledge of the Swift programming language. Although knowledge of object-oriented design and data structures will be useful, it is not necessary.

With the following software and hardware list you can run all code files present in the book (Chapter 1-13).

Software and Hardware List

Chapter Software required OS required
1 to 13 Xcode 12 macOS
10 Firebase account macOS

Related products

Get to Know the Author(s)

Giordano Scalzo is a developer with 20 years of programming experience, since the days of ZX Spectrum. He has worked in Swift, Objective-C, C/C++, Java, .Net, Ruby, Python, and in a ton of other languages that he has forgotten the names of. After years of backend development, over the past 5 years, Giordano has developed extensively for iOS, releasing more than 20 apps—apps that he wrote for clients, enterprise applications, or on his own. Currently, he is a contractor in London, where he delivers code for iOS through his company, Effective Code Ltd, with the objective being quality and reliability.

Edgar Nzokwe is a software engineer at Booz Allen and an adjunct computer science instructor at Howard Community College in Maryland. He has more than 5 years of experience in the field of software engineering and has spent most of that time building web and mobile applications. His areas of expertise include SwiftUI, UIKit, and Kotlin. Edgar is dedicated to advancing the knowledge base of SwiftUI because he believes it will significantly improve UI and cross-platform app development time.

Other books by the authors

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781838981860

swiftui-cookbook's People

Contributors

dedgar1 avatar deepesh-packt avatar gscalzo avatar packt-itservice avatar packtutkarshr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftui-cookbook's Issues

Chapter 10 "Filename too long" on Windows 10 / 64 bit

Hello, there is a following issue on Windows when trying to clone your code, even to the top dir c:\

image

git.exe clone --progress -v "https://github.com/PacktPublishing/SwiftUI-Cookbook.git" "C:\SwiftUI-Cookbook"
Cloning into 'C:\SwiftUI-Cookbook'...
POST git-upload-pack (225 bytes)
remote: Enumerating objects: 1026, done.
remote: Counting objects: 100% (1026/1026), done.
remote: Compressing objects: 100% (716/716), done.
remote: Total 6893 (delta 357), reused 728 (delta 203), pack-reused 5867
Receiving objects: 100% (6893/6893), 76.17 MiB | 4.84 MiB/s, done.
Resolving deltas: 100% (2515/2515), done.
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRCurrentDateProvider.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRCurrentDateProvider.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsBackoffController.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsBackoffController.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsStatus.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.m: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.m: Filename too long
warning: unable to access 'Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/.gitattributes': Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallationsAuthTokenResult.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallationsErrors.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallationsVersion.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FirebaseInstallations.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/FirebaseRemoteConfig/FirebaseRemoteConfig/Sources/Public/FirebaseRemoteConfig/FirebaseRemoteConfig.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORConsoleLogger.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREventDataObject.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCOREventTransformer.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORReachability.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORStorageEventSelector.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORStorageProtocol.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GoogleDataTransport.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/Target Support Files/Pods-FirebaseRemoteConfigApp/Pods-FirebaseRemoteConfigApp-acknowledgements.markdown: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/Target Support Files/Pods-FirebaseRemoteConfigApp/Pods-FirebaseRemoteConfigApp-acknowledgements.plist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/Target Support Files/Pods-FirebaseRemoteConfigApp/Pods-FirebaseRemoteConfigApp-frameworks-Debug-input-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/Target Support Files/Pods-FirebaseRemoteConfigApp/Pods-FirebaseRemoteConfigApp-frameworks-Debug-output-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/Target Support Files/Pods-FirebaseRemoteConfigApp/Pods-FirebaseRemoteConfigApp-frameworks-Release-input-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/03 - Integrating Firebase into a SwiftUI project/FirebaseRemoteConfigApp/Pods/Target Support Files/Pods-FirebaseRemoteConfigApp/Pods-FirebaseRemoteConfigApp-frameworks-Release-output-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/GoogleDataTransportCCTSupport/GoogleDataTransportCCTSupport/GDTCCTLibrary/Private/GDTCCTCompressionHelper.h: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-frameworks-Debug-input-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-frameworks-Debug-output-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-frameworks-Release-input-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-frameworks-Release-output-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-resources-Debug-input-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-resources-Debug-output-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-resources-Release-input-files.xcfilelist: Filename too long
error: unable to create file Chapter10 - Handling authentication and Firebase with SwiftUI/04 - Using Firebase to sign in using Google/FirebaseGoogleLoginApp/Pods/Target Support Files/Pods-FirebaseGoogleLoginApp/Pods-FirebaseGoogleLoginApp-resources-Release-output-files.xcfilelist: Filename too long
fatal: cannot create directory at 'Chapter10 - Handling authentication and Firebase with SwiftUI/05 - Implementing a distributed Notes app with Firebase and SwiftUI/FirebaseNotesApp/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/Protogen/nanopb': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
git did not exit cleanly (exit code 128) (20829 ms @ 4/9/2021 2:26:51 PM)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.