WWDC2023-10013

Studying this session and trying to add code to add in- App purchases to my App, currently free in the App Store. Referring to the Code at 14:10 - 19:37 the code references await BirdBrain.shared.xxxxxxx

Where is explanation of the declaration of BirdBrain struct/class or function?

Replies

Hi, the WWDC session you're referencing mostly discusses the UI side of adding in-app purchase to your app, so we don't really get into detail about the behind the scenes business logic. The BirdBrain singleton is meant to implement the business logic for Backyard Birds. You can download and run the full sample project, including the source for BirdBrain.swift here: Backyard Birds: Building an app with SwiftData and widgets.

Meet StoreKit 2 is a great video which explains how to use the core in-app purchase APIs for implementing your business logic.

Add a Comment