Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering iOS 18 Development
  • Table Of Contents Toc
Mastering iOS 18 Development

Mastering iOS 18 Development

By : Avi Tsadok
5 (3)
close
close
Mastering iOS 18 Development

Mastering iOS 18 Development

5 (3)
By: Avi Tsadok

Overview of this book

Embark on a comprehensive iOS 18 development journey with Avi Tsadok, a veteran iOS developer and author of 4 books and over 40 tutorials and articles. A recognized public speaker, Avi has a knack for demystifying complex concepts and brings unparalleled expertise to the forefront of iOS 18 development education. This guide focuses on iOS 18 advancements, equipping developers with tools to maximize its potential. This book covers essential topics for seasoned developers, including Swift, SwiftUI, Xcode foundations, and the latest iOS SDK updates. You’ll get to grips with optimizing performance and understanding advanced architectural paradigms. By implementing the newest iOS updates, you’ll also explore intricate animation methods and harness a new framework, SwiftData that replaces Core Data for having persistent storage. The book builds your proficiency in advanced networking with URLSession and shows you how to conjure stunning visuals and adopt sophisticated testing techniques. You'll explore the world of machine learning with Apple’s Core ML diving into built-in frameworks like NLP, vision, and sound analysis to train and integrate your own models into iOS apps. By the end of the book, you'll possess skills to build exceptional apps, excel in advanced roles, and confidently tackle iOS development challenges.
Table of Contents (20 chapters)
close
close
Lock Free Chapter
1
Part 1: Getting Started with iOS 18 Development
11
Part 2: Refine your iOS Development with Advanced Techniques

Adding tests

The principle of testing a macro is to test a code block before and after the macro expansion.

As part of our Swift Macros package, we have a test target (Figure 10.10):

Figure 10.10: A testing target for StructInitMacro

Figure 10.10: A testing target for StructInitMacro

Each Swift package comes with a testing target, and in this case, we already have one test with the stringify macro that comes when we create a new Swift Macros package.

Let’s clear the test file and start our own test.

To test a macro, we need to create the XCTestCase subclass and create a new method called testMacro. Remember that test functions in XCTest always start with the phrase “test” followed by the test name.

To test a macro expansion, we will use a particular SwiftSyntax function called assertMacroExpansion. The most important function parameters are as follows:

  • _originalSource: The original code before the expansion, including the macro attribute itself
  • expandedSource...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering iOS 18 Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon