Book description
iOS 11, Swift 4, and Xcode 9 provide many new APIs for iOS developers. With this cookbook, you’ll learn more than 170 proven solutions for tackling the latest features in iOS 11 and watchOS 4, including new ways to use Swift and Xcode to make your day-to-day app development life easier. This collection of code-rich recipes also gets you up to speed on continuous delivery and continuous integration systems.
Ideal for intermediate and advanced iOS developers looking to work with the newest version of iOS, these recipes include reusable code on GitHub, so you can put them to work in your project right away.
Among the topics covered in this book:
- New features in Swift 4 and Xcode 9
- Tools for continuous delivery and continuous integration
- Snapshot testing and test automation
- Creating document-based applications
- Updated Map view and Core Location features
- iOS 11’s Security and Password Autofill
- Data storage with Apple’s Core Data
- Creating lively user interfaces with UI Dynamics
- Building iMessage applications and sticker packages
- Integrating Siri into your apps with Siri Kit
- Creating fascinating apps for Apple Watch
Publisher resources
Table of contents
- Preface
-
Continuous Integration and Delivery
- 1.1. Setting Up Xcode Server
- 1.2. Connecting Local Xcode to Xcode Server
- 1.3. Archiving Your Apps with Xcode Bots
- 1.4. Running Your Tests Automatically with Xcode Bots
- 1.5. Performing Analysis of Your Code Using Xcode Bots
- 1.6. Integrating GitHub Projects with Travis
- 1.7. Installing the Travis CLI
- 1.8. Running Your Unit Tests with Travis
- 1.9. Building and Archiving Your Project with Travis
- 1.10. Installing and Setting Up fastlane
- 1.11. Building Your Apps with fastlane
- 1.12. Testing Your Apps with fastlane
- 1.13. Enabling Slack Notifications in fastlane
- 1.14. Archiving Your Apps with fastlane
- 1.15. Uploading Your Apps to iTunes Connect with fastlane
- Snapshot Testing
- SiriKit
-
Measurements and Units
- 4.1. Converting Between and Working with Length Units
- 4.2. Working with and Switching Between Angle Units
- 4.3. Representing and Converting Between Durations of Time
- 4.4. Using and Working with Frequency Units
- 4.5. Working with and Using Power Units
- 4.6. Representing and Comparing Temperature Units
- 4.7. Working with and Converting Volume Units
- Core Data
-
Swift and Cocoa Touch
- 6.1. Extending Typed Arrays
- 6.2. Taking Advantage of Open Collection Ranges
- 6.3. Organizing Private Functions and Properties with Extensions
- 6.4. Defining Key Paths in Swift
- 6.5. Parsing from and to JSON with Swift
- 6.6. Handling Corner Cases in JSON Parsing with Swift
- 6.7. Partitioning Arrays into Segments
- 6.8. Setting Constraints on Extensions
- 6.9. Defining Object Requirements Through Protocols
- 6.10. Creating New Data Types by Combination
- 6.11. Adding Logic Through Protocols
- 6.12. Defining Constraints on Protocols
- 6.13. Handling Errors in Swift
- 6.14. Specifying Preconditions for Methods
- 6.15. Ensuring the Execution of Code Blocks Before Exiting Methods
- 6.16. Checking for API Availability
- 6.17. Creating Your Own Set Types
- 6.18. Conditionally Extending a Type
- 6.19. Optimizing Your Swift Code
- 6.20. Building Equality Functionality into Your Own Types
- 6.21. Grouping switch Statement Cases Together
- 6.22. Looping Conditionally Through a Collection
- 6.23. Bundling and Reading Data in Your Apps
-
Xcode 9 and Interface Builder
- 7.1. Changing Variable Names in the Current Scope
- 7.2. Utilizing Regular Expressions in Your Xcode Searches
- 7.3. Debugging Apps on an iOS Device Wirelessly
- 7.4. Making Sure UI Methods Run on the Main Thread
- 7.5. Creating a GitHub Repository for Your Project in Xcode
- 7.6. Synchronizing Your Code with GitHub Inside Xcode
- 7.7. Categorizing and Downloading Assets to Get Smaller Binaries
- 7.8. Exporting Device-Specific Binaries
- 7.9. Linking Separate Storyboards Together
- 7.10. Adding Multiple Buttons to the Navigation Bar
- 7.11. Showing the Header View of Your Swift Classes
- 7.12. Designing Interactive Interface Objects in Playgrounds
-
The User Interface
- 8.1. Animating Details with Peek and Pop
- 8.2. Providing Dynamic 3D Touch Menus on Home Screen
- 8.3. Asking Your Users for App Store Reviews in Your App
- 8.4. Providing Vibrational Feedback to Users
- 8.5. Supporting Drag and Drop in Your Apps
- 8.6. Scaling Fonts in Order to Support Dynamic Types
- 8.7. Adjusting Labels While Supporting Dynamic Types
- 8.8. Extracting Named Colors from Asset Catalogs
- 8.9. Animating Views
- 8.10. Attaching Live Views to Playgrounds
- 8.11. Running Playgrounds as Interactive and Continuous Apps
- 8.12. Arranging Your Components Horizontally or Vertically
- 8.13. Customizing Stack Views for Different Screen Sizes
- 8.14. Creating Anchored Constraints in Code
- 8.15. Allowing Users to Enter Text in Response to Local and Remote Notifications
- 8.16. Dealing with Stacked Views in Code
- 8.17. Showing Web Content in Safari View Controller
- 8.18. Laying Out Text-Based Content on Your Views
- 8.19. Improving Touch Rates for Smoother UI Interactions
- 8.20. Supporting Right-to-Left Languages
- 8.21. Associating Keyboard Shortcuts with View Controllers
- 8.22. Recording the Screen and Sharing the Video
- Document-Based Apps
-
Apple Watch
- 10.1. Downloading Files onto the Apple Watch
- 10.2. Noticing Changes in Pairing State Between the iOS and Watch Apps
- 10.3. Transferring Small Pieces of Data to and from the Watch
- 10.4. Transferring Dictionaries in Queues to and from the Watch
- 10.5. Transferring Files to and from the Watch
- 10.6. Communicating Interactively Between iOS and watchOS
- 10.7. Setting Up the Apple Watch for Custom Complications
- 10.8. Constructing Small Complications with Text and Images
- 10.9. Displaying Time Offsets in Complications
- 10.10. Displaying Dates in Complications
- 10.11. Displaying Times in Complications
- 10.12. Displaying Time Intervals in Complications
- 10.13. Recording Audio in Your Watch App
- 10.14. Playing Local and Remote Audio and Video in Your Watch App
- Contacts
- Extensions
- Web and Search
- Multitasking
-
Maps and Location
- 15.1. Customizing the Map View with System Buttons
- 15.2. Displaying System Annotations on the Map
- 15.3. Clustering Annotations for a Clutter-Free Map
- 15.4. Displaying a Specific Location on the Map
- 15.5. Requesting the User’s Location a Single Time
- 15.6. Requesting the User’s Location in the Background
- 15.7. Customizing the Tint Color of Pins on the Map
- 15.8. Providing Detailed Pin Information with Custom Views
- 15.9. Displaying Traffic, Scale, and Compass Indicators on the Map
- 15.10. Providing an ETA for Transit Transport Type
- 15.11. Launching the iOS Maps App in Transit Mode
- 15.12. Showing Maps in Flyover Mode
- UI Testing
- Core Motion
- Security
- Multimedia
-
UI Dynamics
- 20.1. Adding a Radial Gravity Field to Your UI
- 20.2. Creating a Linear Gravity Field on Your UI
- 20.3. Creating Turbulence Effects with Animations
- 20.4. Adding Animated Noise Effects to Your UI
- 20.5. Creating a Magnetic Effect Between UI Components
- 20.6. Designing a Velocity Field on Your UI
- 20.7. Handling Collisions Between Nonrectangular Views
-
iMessage Stickers and Apps
- 21.1. Setting Up a Sticker Pack Application
- 21.2. Adjusting Sticker Sizes
- 21.3. Building a Full-Fledged iMessage Application
- 21.4. Adding an iMessage App Extension to an Existing App
- 21.5. Utilizing an Expanded View in a Sticker Pack App
- 21.6. Appending Rich Information to Stickers
- 21.7. Creating Interactive Conversations with iMessage Apps
- Index
Product information
- Title: iOS 11 Swift Programming Cookbook
- Author(s):
- Release date: December 2017
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491992470
You might also like
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
Generative Deep Learning, 2nd Edition
Generative AI is the hottest topic in tech. This practical book teaches machine learning engineers and …
book
Metal Programming Guide: Tutorial and Reference via Swift
Master Metal: The Next-Generation Graphics and GPU Programming Platform for Apple Developers Metal enables Apple developers …
book
Flutter and Dart Cookbook
Learn the essentials of working with Flutter and Dart to build full stack applications that meet …