Limit search to available items
Book Cover
E-book
Author Tsadok, Avi

Title Mastering Swift package manager : build and test modular apps using Xcode / Avi Tsadok
Published [United States] : Apress, 2021

Copies

Description 1 online resource
Contents Intro -- Table of Contents -- About the Author -- About the Technical Reviewer -- Chapter 1: Introduction -- Personal View -- The Future by Apple -- About This Book -- Chapter 2: Organized Mess -- Meet "Weathery" -- The Weathery Project -- Code Organization -- Separation of Concerns -- Presentation, Business, and Services -- It All Starts with Data Flow -- The Three-Layer Architecture -- Problems to Mini Problems -- Stability -- Teamwork -- Build Time -- Redesign Our App Architecture -- Take a Paper and Draw a UML -- Do This in Collaboration -- Relations Between Components
What Side to Start? -- Opened and Closed Layers -- Define Design Patterns -- Define Your Entities -- Define Your Interfaces -- Summary -- Chapter 3: Swift Package to Rescue -- In the Meeting Room -- Let's Start with Terminology -- Module -- Library -- Framework -- Swift Package -- Code Location -- Dependencies -- Platform and System Version -- Versioning -- Create Our First Package -- Create a Package from the Command Line -- Xcode 11 and Swift Packages -- Package.swift -- Swift Tools and PackageDescription -- Products and Targets -- Naming -- What Are We Naming? -- Be Consistent -- Be Meaningful
Be Unique -- Platforms -- Dependencies -- Working on Our Package -- Building -- Building from Xcode -- Creating a New Package from Xcode -- Summary -- Chapter 4: Design and Link Our First Package -- What Do We Do Next? -- Linking the Package Libraries -- Think As a Service Provider -- Design a Good API -- Think About the Developer As a Naïve One -- Access Control -- Private -- fileprivate -- Open/Public -- Parameters, Return Type, and Properties in Public Access Level -- Public Constructor -- Access Level in Testing -- Scenario-Driven Design
Three Different Ways Produce Three Different Experiences -- Inout Parameter -- Naming -- Clarity -- Consistency -- Class/Protocol Names -- Method Names -- Comments -- Rendered Documentation -- The Basics -- Discussion and Summary -- Parameters, Returns, and Throws -- Code Blocks -- More Special Fields -- Document Classes, Structs, and Enum -- Summary -- Chapter 5: All About Dependencies -- A Utils Package -- Code Coupling -- Why Code Coupling Matters? -- Types of Coupling -- Structural Dependencies -- Inheritance -- Aggregation -- Usage -- Fan-Out Similarity -- Fan-Out Similarity with Inheritance
Logical Coupling -- Dependencies Between Packages -- A Version-Based Requirement -- Semantic Versioning Standard -- Control Our Dependencies' Update -- Branch-/Commit-Based Requirement -- A Local Dependency -- Project's Remote Dependencies -- Some Best Practices About Dependencies -- Reducing Coupling Level -- Dependency Injection -- Using Closures -- The Responsibility Is on the App -- Summary -- Chapter 6: And Sharing for All -- Sharing Options -- Sharing Using a Public Git Repo -- There Is No Support for Multipackage Repositories -- Versioning -- Remember Semantic Versioning Standard?
Summary Maintaining an iOS project often results in thousands of code files scattered around your folders. Did you ever wanted to reuse those files with other projects but found yourself making copies of Swift files? You are not alone! Many iOS developers struggle with this issue as well norganized projects, duplicated files, difficulty in testing, and long complication times. This book will show how Swift Package Manager can help you handle these problems by restructuring your project to make it efficient and straightforward. Swift Package Manager isn's magic, but you'll likely need a little guidance in using this nifty tool. You'll see how to reorganize projects smartly and efficiently, create your first Swift package, and learn what libraries are in this context. Then share your package with the rest of your projects. Next test your library's quality. And then take your library to the next level of power by including files that go beyond just code. By going over the methodology of big project organization, you will have the ability to extend your project into the future as Apple sees it. Make no mistake, the path for a modular and flexible project is not easy. With the help of Swift Package Manager, it becomes possible and worth it. You will: Create a Swift package both from the command line and from Xcode Manage Swift packages in public and private Git repositories Build test suites to test integrations between packages
Notes Online resource; title from PDF title page (SpringerLink, viewed June 11, 2021)
SUBJECT iOS (Electronic resource) http://id.loc.gov/authorities/names/n2010039603
iOS (Electronic resource) fast
Subject Swift (Computer program language)
Application software -- Programming
Swift (Computer program language)
Form Electronic book
ISBN 9781484270493
1484270495
9781484270509
1484270509