Published in Better Programming·Pinned16 Useful Extensions for SwiftUISome useful code snippets I repeatedly use in projects — As we get closer to WWDC 2022 and possibly version 4.0 of SwiftUI, a framework I've been lucky to have played with almost as long as it’s been around, I thought I might publish a small collection of extensions I find myself using again and again. I hope some of…Programming5 min read
Published in Better Programming·PinnedSet Up Your SwiftUI App to Support In-App PurchasesImplementing the StoreKit framework in SwiftUI — A quick disclaimer: This article is based on iOS 13 and Swift 5.x. I should also mention for beginners in this domain that the StoreKit framework can only be used if you are a registered Apple developer. I put together a more recent one here. StoreKit will not work on…Programming9 min read
Published in Better Programming·PinnedIn-App Purchases and StoreKit in iOS 14Implementing new features in StoreKit — Before you read this story, note an updated version [as in code] can be found here. Subscriptions, Receipts, and StoreKit in iOS 14 The gold standard of in-app purchases and subscriptionsmedium.com Much of the buzz at WWDC2020 was given over to SwiftUI 2.0 and ARKit, so you should forgive yourself for missing a seismic change to the StoreKit framework — a change that will make…Programming6 min read
Published in Better Programming·Pinned7 Ways to Link SwiftUI Views to SpriteKit SceneA look at some different ways to link a class with a SwiftUI interface — I was playing around with SpriteKit, and it occurred to me that it might be a good exercise to remind myself of how many different ways I could link my SwiftUI code with my SpriteKit scene/class. I don’t present these in any order, preference, or recommendation; I show them in…Programming4 min read
Published in Better Programming·6 days agoExtending Apple’s WWDC 2017 Demo App With SceneKit and SwiftUIA second stab at updating Apple’s SceneKit demo — Last week I published an article on rebuilding Apple’s WWDC 2017 SceneKit demo using SwiftUI. A paper that you can find here. Within that article, I rebuilt the controls for the game using SwiftUI, a semi-successful rebuild in which I made one fatal error. I split the SCNSceneRendererDelegate code into…Swift5 min read
Published in Better Programming·Jun 20Rebuilding Apple’s WWDC 2017 Demo App With SceneKit and SwiftUIAn attempt at updating Foxy 2 game code — Sadly, the last time Apple talked about SceneKit at any real length was in 2017, although it did make an appearance of a sort in 2018. In 2017 they did an excellent presentation with a rocking demo that looked really good, foxy2. Fortunately, the demo code is still available and…I OS6 min read
Published in Better Programming·Jun 14Build a 3D Bar Chart in SceneKit With SwiftUICreating the missing component of the new Apple Charts library — I started this article before the WWDC 2022, an event with a sexy new framework announced by Apple called Charts. I was briefly worried as I heard the announcement in the latest SwiftUI talk that I may have been beaten to the post, but I felt better when I realized…I OS5 min read
Published in Better Programming·Jun 10How to Use a Displacement Map to Build a Scene With SceneKit Under SwiftUIContinuing the adventure on SceneKit capabilities — Around the same time they were making the Alien movie, there was a second sci-fi in production that would become a $10 billion dollar franchise that Disney recently rebooted. That movie came out in 1977, and it was called Star Wars. With a company behind it that would go on…Programming6 min read
Published in Better Programming·May 13Creating Custom Geometry With Standard Shapes in SceneKit Under SwiftUIContinuing my investigation into SceneKit — A while back, I wrote a piece about the Swift Algorithms library. A set of code primitives developed by Apple that — well — one day may make it into the core Swift language. Implementations that are probably better pieces of code than you or I would have time to…Swiftui4 min read
Published in Better Programming·May 6Build a Mesh Using Custom Geometry in SceneKit Under SwiftUIUsing a fantastic scene from The Alien series This month in 1979, Sigourney Weaver starred in a lead role for a sci-fi horror movie that would create a franchise of films spanning three decades, the Alien series. During the movie, there is a sequence, just 30 seconds of it, that…Programming6 min read