Eric Spencer

projects


← back to index

iOS Soundboard

A SwiftUI soundboard app built in an afternoon to get more comfortable with iOS.

repo: https://github.com/EricSpencer00/iOS-soundboard


An iOS soundboard written in SwiftUI: a grid of buttons that each play an .mp3 when tapped. Fifteen sounds are bundled into the app. Applause, bell, boing, pop, whoosh, click, beep, ding, buzz, chime, horn, tick, swoosh, ping, thud. A separate "premium" sound (snap) sits behind a lock icon that was never wired up to StoreKit. It was written in a single sitting in mid-August.

The structure is minimal. A SoundData ObservableObject holds the list of SoundItems. A SoundboardView lays them out in a 3-column LazyVGrid. An AudioService plays the file on tap. A PurchaseService stands in for gating the premium sound.


let columns = Array(repeating: GridItem(.flexible(), spacing: 10), count: 3)

LazyVGrid(columns: columns, spacing: 10) {
    ForEach(visibleSounds) { sound in
        SoundButton(
            sound: sound,
            audioService: audioService,
            isPremiumUnlocked: purchaseService.hasPurchasedPremium
        )
    }
}

It came out of iOS work on fair-share and exists to drill the basics: @StateObject, LazyVGrid, sheets, NavigationView toolbars, Image(systemName:).

The repository has two commits, "Initial Commit" and "oneshot". It never shipped to the App Store, the premium tier is not implemented, and the lock icon does not unlock anything. The mp3s are in Soundboard/Sounds/ and the views are in Soundboard/Views/.

GitHub Repo