from/prod
← All companies

THE COMPANY INDEX TRACKED BLOG

Andrew Bancroft

Ideas, decisions, and lessons from the team.

andrewcbancroft.com (opens on the source site)
25Posts tracked
3 months agoLatest publication
0.1Posts / month over the last 12 months

Latest writing

20 of 25 posts

How I Learned to Copy and Paste, and Why I Never Do (opens on the source site)

It was the mid 1990s and I was about thirteen. These were the days of Netscape Navigator and internet connections that made sound (if you know, you know) and delivered web pages slower than molasses flowin’ up hill on a cold winter’s day. So… the pages were simple. And I had a Star Wars fan page I loved. I would look at it and think, “I want to know how to make something like that.” I had a friend who was, like me, a tad bit on the nerdy side. One day the two of us decided we wanted to learn how to build a web page. He had already figured out the secret: You can go to any web page,…

Read at the source

Download macOS Beta Installer (opens on the source site)

When you log into the Apple Developer portal, you can easily download a restore image (ipsw file) for beta versions of macOS, but it’s not helpful if you want to install macOS on a separate volume on your existing Mac. The actual macOS installer is much more useful. The only issue is that it’s not exactly intuitive to download. Here’s how to do it: Step 1: Turn on Beta Updates Open the Settings app on your mac Click General Click Software Update Turn on Beta Updates for macOS Sequoia Step 2: Use Terminal to download the installer Open a terminal window Run softwareupdate --download…

Read at the source

SwiftUI Fundamentals (opens on the source site)

Developing for iOS is a valuable and in-demand skill, but if you haven’t developed in the Apple world before, it can be surprisingly different. In this course, SwiftUI Fundamentals, you’ll quickly get up and running using Xcode 15, Swift, and SwiftUI to establish the foundational skills you need to build great user interfaces for iOS. Resources SwiftUI Fundamentals Course Outline First, you’ll see the tools and learn how to use SwiftUI to create single-screen applications with adaptive user interfaces that work on multiple devices. Next, you’ll learn how to bring your own style to a SwiftUI…

Read at the source

iOS 17 Fundamentals (opens on the source site)

Developing for iOS is a valuable and in-demand skill, but it can be surprisingly different if you haven’t developed for Apple platforms before. In this course, iOS 17 Fundamentals, you’ll quickly get up and running using Xcode 15, Swift 5, and SwiftUI to build great iOS apps and tap into the latest features of iOS 17. Resources iOS 17 Fundamentals Course Outline First, you’ll see the tools and learn the core principles for designing iOS apps with adaptive, accessible, and localized user interfaces that work on multiple devices. Next, you’ll explore how to tackle some of the most common…

Read at the source

Pre-populate a SwiftData Persistent Store (opens on the source site)

Building Blocks These three building blocks will get you there: A ModelContainer instance One or more instances of your @Model class(es) Inserting those model instances into your ModelContainer’s mainContext Let’s take those building blocks one at a time. Initialize a ModelContainer Suppose that you’ve got a SwiftData model called Item that looks something like this: 1 2 3 4 5 6 7 8 @Model final class Item { var timestamp: Date init(timestamp: Date) { self.timestamp = timestamp } } To pre-populate your SwiftData persistent store with instances of Item, you need to initialize a ModelContainer.…

Read at the source

Add SwiftData to an Existing App (opens on the source site)

System Configuration First things first: you need the following before you can get started with SwiftData… You need to install Xcode 15 on your Mac. You need to set your app’s minimum deployment target to macOS 14, iOS 17, tvOS 17, or watchOS 10. Your app needs to use SwiftUI – SwiftData does not work with Storyboard apps. If you have a Storyboard app with some SwiftUI views integrated in, you can use SwiftData with those SwiftUI views. In that situation, it may be best to stick with Core Data to keep data persistence simple and consistent. Essential Pieces of SwiftData Once you configure…

Read at the source

Building iOS User Interfaces with SwiftUI (opens on the source site)

Designing efficient and dynamic apps is essential for taking your iOS developer skills to the next level. In this course, Building iOS User Interfaces with SwiftUI, you’ll build upon the basic knowledge of iOS development you’ve already gained in order to build compelling iOS apps that engage your users. Resources Building iOS User Interfaces with SwiftUI Course Outline First, you’ll see the tools and learn how to create iOS apps with adaptive user interfaces that work on multiple devices. Next, you’ll learn how to manage iOS projects and define the building blocks of your own iOS…

Read at the source

Swift Five - Week of February 14, 2021 (opens on the source site)

Persistence prevails: Dave shares his iOS developer journey After watching Dave Jacobsen’s story on YouTube, I found myself asking, “When would I have given up if I were in Dave’s shoes?” He shares about the sobering reality of how much effort and dedication it really takes to transition careers. But he also proves it’s possible if you persist! CoreML brings the beauty of braille to the seeing How cool is this? Aaron Stephenson is learning braile. He’s also a developer. What does he do to check himself to make sure he’s reading things correctly? He trains a CoreML model to recognize braile…

Read at the source

How to Download Old Versions of Xcode (opens on the source site)

Whyyy would I need an old version of Xcode? Valid question – it’s not often you’ll need one. Two reasons off the top of my head though: 1) To compare with your previous experience Perhaps you’re just wanting to see what things “used to be like”. Maybe you’re struggling with the infamous “this code worked before…now it doesn’t…what changed?” and you just want to build your project with a prior version of Xcode in order to rule it out as the culprit. Grabbing an older version of Xcode could help you here. 2) To upgrade a very old project to newer versions of Swift I hit this one the other day.…

Read at the source

iOS 14 Getting Started (opens on the source site)

Developing for iOS is a valuable and in-demand skill, but if you haven’t developed in the Apple world before, it can be surprisingly different. In this course, iOS 14: Getting Started, you’ll quickly get up and running using Xcode 12, Swift 5, and SwiftUI to build great iOS apps and tap into the latest features in iOS 14. Resources iOS 14 Getting Started Course Outline First, you’ll see the tools and learn how to create iOS apps with adaptive user interfaces that work on multiple devices. Next, you’ll learn how to manage iOS projects and define the building blocks of your own iOS…

Read at the source

WWDC - The Worldwide Developer Community (opens on the source site)

June is an invigorating time for iOS developers worldwide. Invigorating… And exhausting. Me personally? The flurry of new-ness often has me feeling overwhelmed. WWDC - The Worldwide Developer Chase When it comes time for WWDC, are you like me? Do you conjure up a mental image of a race? It’s as if all of us who are enrolled in the Apple Developer Program line up at the starting line and wait for the pistol to fire, signaling the sprint that is the Worldwide Developer Conference Chase. The race metaphor induces pressure. Pressure to figure things out as quickly as you can. Pressure to be one…

Read at the source

StoreKit Testing Swift Start (opens on the source site)

Manually Testing StoreKit Code Development Workflow Changes The previous workflow for setting up in-app purchases was a bit disjointed. You’d have to create your app in Xcode… then jump out to App Store Connect to define your app there… set up your digital products there (in App Store Connect)… and then jump back to Xcode to write your StoreKit code. Now, you can get started in Xcode, and stay in Xcode. Here’s how: Go to the File menu Click New ➡️ File Type “storekit” into the filter Click Next to add a StoreKit Configuration File ✅ From there, you get to add the digital products you intend…

Read at the source

Implementing In-App Purchases on iOS (opens on the source site)

Monetizing apps is challenging. In this course, Implementing In-App Purchases on iOS, you’ll learn to offer digital products and services directly within your app as in-app purchases. Resources Implementing In-App Purchases on iOS Course Outline First, you’ll explore how to translate business requirements into digital products and configure them in App Store Connect and Xcode. Next, you’ll discover how to build and test a store within your app using StoreKit. Finally, you’ll learn how to make sure purchases made within your app are authentic, and unlock content that’s been purchased by your…

Read at the source

iOS Receipt Validation: Understanding and Troubleshooting the Original App Version Field (opens on the source site)

Setting the stage with a use case for checking the original_application_version The task appears to be simple. Suppose that… You have an existing app on the app store that’s currently at version 1.2 You want to shift to the “freemium” model by implementing in-app purchases starting with version 1.3 You want to be fair to previous-purchasers of my app (anyone who downloaded the app between version 1.0 and 1.2) Therefore… You want to check to see if someone originally purchased version 1.2 or below of your app so that you can “grandfather them in” To figure this out, you’ll need to implement…

Read at the source

Privacy Policy (opens on the source site)

Privacy Notice This privacy notice discloses the privacy practices for and applies solely to information collected by the following websites and apps (SERVICE): www.andrewcbancroft.com Ten Read Ten Said This page is used to inform website visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service. If you choose to use our Service, then you agree to the collection and use of information in relation with this policy. The Personal Information that we collect are used for providing and improving the Service. We will not…

Read at the source

4 Reasons Your iOS App Is Crashing (opens on the source site)

CPU cannot execute an instruction Sometimes we developers don’t play fair with the CPU. Suppose that I wrote some code that ended up telling the CPU to divide by zero. That’s… impossible… for you and the CPU. iOS is ensuring its own stability iOS may be enforcing a fundamental requirement or policy for its own stability. Apple isn’t going to let developers wreck the overall user experience of iOS. Examples: Your app takes forever to launch Your app is using too much memory iOS will opt for killing your app to protect the user’s overall iOS experience. Swift runtime is preventing failure There…

Read at the source

4 Things You Should Never Do When Debugging iOS Apps (opens on the source site)

Never change code without reproducing the problem first Reproducing the problem is a critical first step in debugging. Before you start scouring your code… Before you start setting breakpoints… Before you start using tools or changing things… See if you can cause the bug to happen again. The goal of this exercise is to confirm that the problem is consistent. Reproducing the problem helps you clarify the conditions that are present when the bug happens. Do your best to clearly state what’s going on – I even write it down sometimes to document the problem and make sure I’ve got it pinned down.…

Read at the source

What Is Debugging (And What Isn't)? (opens on the source site)

Does it ever help you to narrow the scope of overwhelming topics like “debugging”? It helps me. When you’re new to something like iOS development, you may find yourself stepping into a world of problems. Everyone around you is always fixing something it seems! All kinds of problems can happen when you’re building an iOS app. But are all problems… debugging problems? TLDR; Answer: Not necessarily. My brain appreciates focused definitions. It lightens the the mental load a bit to “bucket” problems into categories. Which problems don’t fit into the “debugging problems” category? Which ones do?…

Read at the source

iOS Debugging Fundamentals (opens on the source site)

Bugs are bound to happen. Getting rid of them is an essential skill if you want to keep your sanity when building apps. In this course, you will learn a set of thinking skills to couple with the fundamental tools that Xcode provides you for finding and fixing flaws in your apps. 🐞1.5 hours 🦟To the point 🐛Engaging storyline 🐜Relevant demos Resources iOS Debugging Fundamentals Course Outline First, you will learn to approach debugging situations with a set of principles for strategic problem solving. Next, you will discover how to configure breakpoints and inspect view hierarchies…

Read at the source

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.