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…
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…
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…
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…
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…
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…
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…
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…
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…
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,…
This is merely a breadcrumb for finding the Apple Developer documentation page where all of the possible SwiftUI Environment keys are listed. Resources Apple Documentation ➡️ SwiftUI ➡️ State and Data Flow ➡️ EnvironmentValues
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…
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…
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…
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…
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…
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…
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…
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;…
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…
Once you’ve passed an NSManagedObjectContext instance to your SwiftUI View , you’ll need to pull data out of your Core Data persistent store with a fetch request. First Things First The remainder of this how-to assumes that you’ve already got a way to initialize the Core Data stack. Ticking the ‘Use Core Data’ checkbox when you start a new app will place some…
Step one to using Core Data with SwiftUI is to initialize the Core Data stack and pass an instance of your NSManagedObjectContext to your view. First Things First The remainder of this how-to assumes that you’ve already got a way to initialize the Core Data stack. Ticking the ‘Use Core Data’ checkbox when you start a new app will place some boilerplate code in AppDelegate . Code…
How does Apple intend for us to use Core Data with SwiftUI? They gave us a path forward with the most recent beta release of iOS 13 (Beta 5 at the time of this writing)! Resources Blog Idea List SwiftUI Example Xcode Project Data Flow Through SwiftUI - WWDC 2019 Session 226 First Things First To work effectively with Core Data in SwiftUI, the Data Flow Through SwiftUI WWDC session is a huge help.…
NSPersistentCloudKitContainer is brand new with Xcode 11 and iOS 13. It works… kind of… sometimes… I’m keeping this list of buggy behavior to help keep my head straight. I’ve also filed bug reports on each. Hopefully others in the iOS community who are experimenting with NSPersistentCloudKitContainer can confirm or deny these same oddities. If they’re fixed…
Resources SwiftUI Essentials Tutorials as Playgrounds Apple's SwiftUI tutorials Why Playgrounds? I’ve been making my way through Apple’s SwiftUI tutorials . If you’re anything like me, you learn by tinkering with things. Change the modifiers, reposition Text , use a different Image , and see what happens. BUT. Without macOS Catalina, iterating quickly on these tinker sessions…
Imagine writing some Swift code. You want to share it across multiple apps, so you build a framework. You compile it with the Swift 4.0 compiler. Now imagine Apple announces Swift 4.1. Sweet! You decide to build a new app and compile it with the Swift 4.1 compiler. Ah, but your apps needs some of that “shared feature” code from your framework. Will it work? I’ll give you one…
If you constantly run the same set of commands at the command line, why not automate that? I found myself typing the same things over and over to deploy this website. Here’s how I encapsulated it into a script that saves me keystrokes at the command line. 1) Create a new text file with a .sh extension. I created a new file called deploy.sh for my website. 2) Add #!/bin/bash to the top of it.…
“ABI” stands for “ A pplication B inary I nterface”. The word “interface” means the same as it does in other places where you hear the word. If a human wants to interact with a computer, s/he needs a way to engage with it. A user interface is the point where humans and computers communicate with one another. If a computer wants to interact with a computer, it…
Apps aren’t “dumb”. Apps do things. Smart things. The question is: Where do the “smart parts” go? So how you smart or how dumb should NSManagedObject subclasses be? What code should you write in one of these? What should you not ? TLDR; Keep NSManagedObject s about Core Data-y things. Ask, “Does this help my NSManagedObject subclass work with Core Data-related…
Setting the Stage Suppose one of the NSManagedObject subclasses from your Core Data data model looked like this: 1 2 3 4 5 6 public class BlogIdea : NSManagedObject { @NSManaged public var ideaTitle : String ? @NSManaged public var ideaDescription : String ? } Suppose that you also have a class that will provide BlogIdeas to your view controller: 1 2 3 class BlogIdeaProvider { // fetches BlogIdea…
If you’re looking for a quicker way to iterate while you’re building SwiftUI views, and you don’t have macOS Catalina installed, you might enjoy the Playground experience more than you enjoy pressing command + R every time you make a change and want to see it in the user interface. How do you do it? Here’s a code snippet to copy-paste into a Playground to get you going. 1…
First Things First In order to use NSPersistentCloudKitContainer in your app, you need to be targeting iOS 13+. The CloudKit syncing portion only works on physical devices (not in the simulator). That being the case, you’ll need two or more devices running the app and using the same iCloud account to fully test things out and make sure syncing and data merging behavior works as you’d…
A new SceneDelegate was introduced for Storyboard-based apps in iOS 13, and with it came some changes in how you’re able to access your app’s root view controller at app launch. The Old Way AppDelegate Swift file used to be where code landed for accessing your app’s rootViewController : 1 func application ( _ application : UIApplication , didFinishLaunchingWithOptions…
Capabilities Search In your project settings, you can search for capabilities you want to add (instead of scrolling down the list and turning things “on” or “off”). Editor Quick Actions Holding the command key down while mousing over and clicking on various levels of your code presents a quick action pop-out. Handy! Xcode 10 had some of these as well, but Xcode 11 adds…
You’ve done the work to get your Core Data model ready, but right when you hit run, wham . Your debug output log shows: Failed to load model named ModelName You you may experience one of these when you attempt to access your persistent container: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value What in the world is going on? Double-check Target Membership…
Resources Using Core Data With CloudKit - WWDC 2019 Session 202 Sample Project from Apple How NSPersistentCloudKitContainer Helps I suppose the first question everyone should ask is, “What’s the big deal? How does NSPersistentCloudKitContainer even help me?” I noted at least three huge wins from the WWDC 2019 session . Ask yourself… “Do I want to figure out how to…
“Declarative” is one of Swift UI’s four core principles. Aside from taking for granted that declarative is just “better” than whatever else , how about a visual to understand the declarative way of thinking? Imagine yourself in a restaurant (sit-down or fast food, whichever). When you want a burger, which best describes what you do? or… Saying what you want…
Resources Tutorial Reference Enabling SwiftUI Opting in to using SwiftUI is as easy as creating a new project with Xcode 11 and clicking the “Use SwiftUI” checkbox. Starting Point Xcode will give you two structs to start with: One that describes the View ’s content and layout One that declares a preview for that View View 1 struct ContentView : View { 2 var body : some View { 3…
Prerequisites No additional R packages are necessary for this notebook to run Cells in this notebook expect the Car Sales.csv file to be in certain locations; specifics are in the cell itself Resources to help you practice are available at the end Load Data From a CSV File File is in the same directory as your Jupyter Notebook 1 # Read the CSV file 2 car.sales <- read.csv ( 'Car Sales.csv' ) 3 4 #…
Where’s the Live View? So you’ve created a new Single View playground from the template picker… You run the playground right out of the gate to see what you’ve got… But… Where’s the Live View? Showing the Live View To get the live view to show up, you need to open the Assitant Editor . You can do this by clicking View - Assistant Editor - Show Assistant…
Sometimes, functions ask you to specify an axis . The documentation can often feel vague and/or technical. For instance, here’s a quote from the apply function’s documentation: axis : {0 or ‘index’, 1 or ‘columns’}, default 0 Axis along which the function is applied: 0 or ‘index’: apply function to each column. 1 or ‘columns’: apply function to each row. Uuuum… right. So…
Resources Right-click -> Save as... Car Sales.xlsx load-excel-file-with-python-pandas.ipynb Prerequisites Install the Pandas library for your Python environment Cells in this notebook expect the Car Sales.xlsx file to be in certain locations; specifics are in the cell itself Resources to help you practice First Things First 1 import pandas as pd Load Data From Excel File is in the same directory…
Resources Right-click -> Save as... Car Sales.csv load-csv-file-with-python-pandas.ipynb Prerequisites Install the Pandas library for your Python environment Cells in this notebook expect the Car Sales.csv file to be in certain locations; specifics are in the cell itself Resources to help you practice First Things First 1 import pandas as pd Load Data From a CSV File File is in the same directory…
Command Mode (Blue) Shortcut What Happens h Shows a pop-up window listing out all keyboard shortcuts cmd + shift + p (Mac) ctrl + shift + p (Win) Shows the Command Palette enter Goes into Edit Mode (green) for the currently selected cell ctrl + enter Runs the selected cell shift + enter Runs the selected cell; Selects the cell below option + shift + enter (Mac) alt + enter (Win) Runs the selected…
Prerequisites: The SqlServer PowerShell module must be installed. Run Install-Module -Name SqlServer if you need to install it… create-credential.ps1 1 import-module SqlServer 2 3 $storageAccount = '<StorageAccountName>' #replace this with your Azure storage account name 4 $storageKey = '<StorageAccountKey>' #replace this with one of your Azure storage account keys 5 $secureString =…
Step away from inferential statistics for a while and the interpretation of Type I and Type II errors in hypothesis testing could slip away. How about a mnemonic to help solidify the concepts? To frame the mnemonic, consider the following scenario: A man has been charged with murder and you’re on the jury. Witnesses have brought forth testimony. Evidence has been submitted. You’ve just…
We’ve all been there. Do a search on the topic of “saving data in iOS” and you’ll get dozens of search results mentioning at least six different frameworks and platforms, and a month’s worth of reading. Wouldn’t it be nice to distill the possibilities down into just what you need in order to start down a path for persisting data in your app? “ iOS Data Persistence:…
What is the tilde ( ~ ) “symbol” in R? If you were to put words to what it is , how would you explain it or interpret it? What does it mean (and therefore, what does it do )? Here, I document a few of the unpackings that I’ve run across when it comes to ~ in R. From the Docs: “y on x” In the R-project.org documentation , tilde ~ starts getting mentioned in chapter 11…
Data is making it to the Event Hub…at least you’re 99% sure it is, because successful requests are being made by your app/device and received by the Hub. The trouble is, when you attempt to sample data with Azure Stream Analytics, you come up empty with a message like No events found for HubName . or Diagnostics: While sampling data, no data was received from # partitions. In my…